device_connection_status.dart
Purpose
The device_connection_status.dart file defines an enum that represents the connection states of a Bluetooth device. This enum is used across the Flutter application to reflect and manage connection state logic.
Enum Definition
enum DeviceConnectionStatus {
disconnected,
connecting,
connected,
reconnecting
}
Enum Values and Meanings
Status |
Description |
|---|---|
|
The device is not connected. This is the default or initial state. |
|
The device is in the process of establishing a BLE connection. |
|
The device is actively connected via BLE. |
|
A connection was lost and is currently being re-established. |
Usage Context
This enum is used in:
SmartBand APIs
Sensoria APIs
MetaWear APIs
…to uniformly represent BLE connection lifecycle across all devices in the app.