BluetoothManagerAndroid class
Android-specific implementation of the plugin.
Talks to the native side through the bluetooth_manager MethodChannel
and listens to adapter state changes through the
bluetooth_manager/events EventChannel. Raw string responses coming
from the native side are converted into the typed enums
BluetoothState / ActionResponse. Any unknown value is mapped to
BluetoothState.uknow / ActionResponse.responseError so the Dart layer
never throws a TypeError.
Constructors
Properties
- 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> -
Calls
BluetoothAdapter.disable()on the native side. -
enable(
) → Future< ActionResponse> -
Calls
BluetoothAdapter.enable()on the native side. -
getState(
) → Future< BluetoothState> - Returns the current BluetoothState reported by the native Android plugin. Unknown values are mapped to BluetoothState.uknow.
-
getStateStream(
{int timer = 1000}) → Stream< BluetoothState> - Emits the current BluetoothState every time the adapter changes state.
-
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