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
Properties
- bmAndroid → BluetoothManagerAndroid
-
Android implementation, used when
Platform.isAndroidistrue.final - bmIOS → BluetoothManagerIOS
-
iOS implementation, used when
Platform.isIOSistrue.final - bmMacOS → BluetoothManagerMacOS
-
macOS implementation, used when
Platform.isMacOSistrue.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