ClassicBluetooth class

Inheritance

Constructors

ClassicBluetooth.new()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
listenBluetoothState StreamController<bool>
finalinherited
listenConnectState StreamController<bool>
finalinherited
listenDiscovery StreamController<bool>
finalinherited
notifiedDevices List<BluetoothDiscoveryResult>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

availableBluetooth() Future<bool>
Checks whether the device supports Bluetooth
override
bluetoothIsEnabled() Future<bool>
The device bluetooth is enabled
override
connect(ClassicBluetoothDevice 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
override
connectWithMac(String name, String macAddress) Future<ConnectedDevice>
discovered() Stream<ClassicBluetoothDevice>
discovered devices
override
init() Future<void>
inherited
isConnected() Future<bool>
The device is connected
override
isDiscovery() Future<bool>
is discovery bluetooth
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
origin() → FlutterBluetoothSerial
override
setPin(String? pin) Future<void>
startDiscovery({bool disconnectConnectedDevice = true, bool useMac = true, Duration timeout = FluetoothConst.defDiscoveryTimeout}) Future<void>
start discovery disconnectConnectedDevice disconnect already connected device timeout discovery timeout, default is 10s
override
stopDiscovery() Future<void>
stop discovery
override
toString() String
A string representation of this object.
inherited

Operators

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