FlutterBluetoothSerial class


address Future<String>
Returns the hardware address of the local Bluetooth adapter. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
isAvailable Future<bool>
Checks is the Bluetooth interface avaliable on host device.
isConnected Future<bool>
@Deprecated('Use `BluetoothConnection.isEnabled` instead'), read-only
isDiscoverable Future<bool>
Describes is the local device in discoverable mode.
isDiscovering Future<bool>
Describes is the dicovery process of Bluetooth devices running.
isEnabled Future<bool>
Describes is the Bluetooth interface enabled on host device.
isOn Future<bool>
Checks is the Bluetooth interface enabled on host device.
@Deprecated('Use `isEnabled` instead'), read-only
name Future<String>
Returns the friendly Bluetooth name of the local Bluetooth adapter. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state Future<BluetoothState>
State of the Bluetooth adapter.


bondDeviceAtAddress(String address, {String pin, bool passkeyConfirm}) Future<bool>
Starts outgoing bonding (pairing) with device with given address. Returns true if bonded, false if canceled or failed gracefully. [...]
cancelDiscovery() Future<void>
Cancels the discovery
changeName(String name) Future<bool>
Sets the friendly Bluetooth name of the local Bluetooth adapter. [...]
connect(BluetoothDevice device) Future<void>
@Deprecated('Use `BluetoothConnection.toAddress(device.address)` instead')
connectToAddress(String address) Future<void>
@Deprecated('Use `BluetoothConnection.toAddress(address)` instead')
disconnect() Future<void>
@Deprecated('Use `BluetoothConnection.finish` or `BluetoothConnection.close` instead')
getBondedDevices() Future<List<BluetoothDevice>>
Returns list of bonded devices.
getBondStateForAddress(String address) Future<BluetoothBondState>
Checks bond state for given address (might be from system cache).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
onRead() Stream<Uint8List>
@Deprecated('Use `BluetoothConnection.input` instead')
onStateChanged() Stream<BluetoothState>
Allows monitoring the Bluetooth adapter state changes.
openSettings() Future<void>
Opens the Bluetooth platform system settings.
removeDeviceBondWithAddress(String address) Future<bool>
Removes bond with device with specified address. Returns true if unbonded, false if canceled or failed gracefully. [...]
requestDisable() Future<bool>
Tries to disable Bluetooth interface (if enabled).
requestDiscoverable(int durationInSeconds) Future<int>
Asks for discoverable mode (probably always prompt for user interaction in fact). Returns number of seconds acquired or zero if canceled or failed gracefully. [...]
requestDiscoverableNoPrompt(int durationInSeconds) Future<int>
requestEnable() Future<bool>
Tries to enable Bluetooth interface (if disabled). Probably results in asking user for confirmation.
setPairingRequestHandler(Future handler(BluetoothPairingRequest request)) → void
Allows listening and responsing for incoming pairing requests. [...]
startDiscovery() Stream<BluetoothDiscoveryResult>
Starts discovery and provides stream of BluetoothDiscoveryResults.
toString() String
Returns a string representation of this object.
write(String message) Future<void>
@Deprecated('Use `BluetoothConnection.output` with some decoding (such as `ascii.decode` for strings) instead')
writeBytes(Uint8List message) Future<void>
@Deprecated('Use `BluetoothConnection.output` instead')


operator ==(Object other) bool
The equality operator. [...]

Static Properties

instance FlutterBluetoothSerial


namespace → const String