FlutterBle class

Properties

isAvailable → Future<bool>
Checks whether the device supports Bluetooth
read-only
isOn → Future<bool>
Checks if Bluetooth functionality is turned on
read-only
logLevel LogLevel
read-only
state → Future<BluetoothState>
Gets the current state of the Bluetooth module
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

connect(BluetoothDevice device, { Duration timeout, bool autoConnect: true }) → Stream<BluetoothDeviceState>
Establishes a connection to the Bluetooth Device. Returns a stream of BluetoothDeviceState Timeout closes the stream after a specified Duration To cancel connection to device, simply cancel() the stream subscription
onStateChanged() → Stream<BluetoothState>
Occurs when the bluetooth state has changed
scan({ScanMode scanMode: ScanMode.lowLatency, List<Guid> withServices: const [], List<Guid> withDevices: const [], Duration timeout }) → Stream<ScanResult>
Starts a scan for Bluetooth Low Energy devices Timeout closes the stream after a specified Duration
scanForBPM({ScanMode scanMode: ScanMode.lowLatency, List<Guid> withDevices: const [], Duration timeout }) → Stream<ScanResult>
Scanning for glucometer device services
scanForGlucometer({ScanMode scanMode: ScanMode.lowLatency, List<Guid> withDevices: const [], Duration timeout }) → Stream<ScanResult>
Scanning for glucometer device services
scanForScale({ScanMode scanMode: ScanMode.lowLatency, List<Guid> withDevices: const [], Duration timeout }) → Stream<ScanResult>
Todo refactor to search in a better way, need to improve dart skills
setLogLevel(LogLevel level) → void
Sets the log level of the FlutterBle instance Messages equal or below the log level specified are stored/forwarded, messages above are dropped.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

instance FlutterBle
read-only