BluetoothManagerIOS class
iOS-specific implementation of the plugin.
Because iOS does not expose a public API to toggle Bluetooth, this class
can only read the current state (through CoreBluetooth on the native
side) and ask the system to open settings. Deep links to the Bluetooth pane
are attempted on the native side but are often ignored by iOS; the plugin
then falls back to your app’s page in the Settings app.
State changes are delivered through the bluetooth_manager/events
EventChannel, which is backed by CBCentralManagerDelegate on the
native side.
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
-
getState(
) → Future< BluetoothState> - Returns the current BluetoothState reported by the native iOS plugin.
-
getStateStream(
{int timer = 1000}) → Stream< BluetoothState> - Emits the current BluetoothState every time the adapter state changes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openBluetoothSettings(
) → Future< void> - Opens settings so the user can enable or disable Bluetooth.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited