Fluetooth<PROVIDER, DEVICE extends FluetoothDevice> class abstract

fluetooth traits

Constructors

Fluetooth()

Properties

hashCode → int
The hash code for this object.
no setterinherited
listenBluetoothState → StreamController<bool>
final
listenConnectState → StreamController<bool>
final
listenDiscovery → StreamController<bool>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

availableBluetooth() → Future<bool>
Checks whether the device supports Bluetooth
bluetoothIsEnabled() → Future<bool>
The device bluetooth is enabled
connect(DEVICE device) → Future<ConnectedDevice>
connect device device Expected connect device autoSwitchDevice If some device already connect, will be release this connection and connect to new device, default is false
discovered() → Stream<DEVICE>
discovered devices
init() → Future<void>
isConnected() → Future<bool>
The device is connected
isDiscovery() → Future<bool>
is discovery bluetooth
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
origin() → PROVIDER
startDiscovery({bool disconnectConnectedDevice = true, bool useMac = true, Duration timeout = FluetoothConst.defDiscoveryTimeout}) → Future<void>
start discovery disconnectConnectedDevice disconnect already connected device useMac ble use deviceId or mac timeout discovery timeout, default is 10s
stopDiscovery() → Future<void>
stop discovery
toString() → String
A string representation of this object.
inherited

Operators

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