BluetoothManagerPath class

Platform router used internally by BluetoothManager.

It delegates each operation to the Android, iOS or macOS implementation based on Platform.isAndroid / Platform.isIOS / Platform.isMacOS. When running on any other platform every method throws a descriptive platform_not_supported error.

Constructors

BluetoothManagerPath()

Properties

bmAndroid BluetoothManagerAndroid
Android implementation, used when Platform.isAndroid is true.
final
bmIOS BluetoothManagerIOS
iOS implementation, used when Platform.isIOS is true.
final
bmMacOS BluetoothManagerMacOS
macOS implementation, used when Platform.isMacOS is true.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disable() Future<ActionResponse>
Disables the Bluetooth adapter on Android or opens the Bluetooth settings screen on iOS / macOS.
enable() Future<ActionResponse>
Enables the Bluetooth adapter on Android or opens the Bluetooth settings screen on iOS / macOS.
getState() Future<BluetoothState>
Returns the current BluetoothState of the device.
getStateStream({int timer = 1000}) Stream<BluetoothState>
Emits the current BluetoothState when the adapter state changes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited