BluetoothManager class
Class for managing Bluetooth operations
Constructors
- BluetoothManager()
-
Factory constructor
factory
Properties
-
bondedDevices
→ List<
BluetoothDevice> -
Returns the list of bonded devices (unmodifiable list)
no setter
- connectedDevice → BluetoothDevice?
-
Returns the connected device
no setter
- connectionState → BluetoothConnectionState
-
Returns the connection state
no setter
-
devices
→ List<
BluetoothDevice> -
Returns the list of found devices (unmodifiable list)
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Is connection established?
no setter
- isScanning → bool
-
Is scanning in progress?
no setter
-
onConnectionStateChanged
→ Stream<
BluetoothConnectionState> -
Stream triggered when connection state changes
no setter
-
onDeviceFound
→ Stream<
BluetoothDevice> -
Stream triggered when device is found
no setter
-
onDiscoveryFinished
→ Stream<
void> -
Stream triggered when discovery finishes
no setter
-
onScanStateChanged
→ Stream<
BluetoothScanState> -
Stream triggered when scan state changes
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scanState → BluetoothScanState
-
Returns the scan state
no setter
Methods
-
connect(
String address) → Future< bool> - Connects to a device
-
disconnect(
) → Future< bool> - Disconnects from a device
-
dispose(
) → void - Closes the stream controllers
-
getBondedDevices(
) → Future< List< BluetoothDevice> > - Gets and updates the bonded devices
-
isBluetoothEnabled(
) → Future< bool> - Checks if Bluetooth is enabled
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pairDevice(
String address) → Future< bool> - Pairs with a device
-
startDiscovery(
) → Future< bool> - Starts device discovery
-
stopDiscovery(
) → Future< bool> - Stops device discovery
-
toString(
) → String -
A string representation of this object.
inherited
-
unpairDevice(
String address) → Future< bool> - Unpairs from a device
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited