BtServicePlatform class abstract
- Inheritance
-
- Object
- PlatformInterface
- BtServicePlatform
- Implementers
Constructors
- BtServicePlatform()
- Constructs a BtServicePlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onData
→ Stream<
Uint8List> -
Stream of incoming data as bytes.
no setter
-
onDeviceDiscovered
→ Stream<
Map< String, dynamic> > -
Stream of discovered devices during scanning.
no setter
-
onState
→ Stream<
String> -
Stream of state changes: 'connected','disconnected','error'.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connect(
String address) → Future< void> - Connect to a device by MAC address (RFCOMM SPP UUID used).
-
disconnect(
) → Future< void> - Disconnect the current connection.
-
getPairedDevices(
) → Future< List< Map< >String, dynamic> > - Get list of paired devices.
-
getPlatformVersion(
) → Future< String?> -
isConnected(
) → Future< bool> - Whether currently connected.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
Uint8List bytes) → Future< void> - Send raw bytes over the connected socket.
-
startScan(
) → Future< void> - Start scanning for nearby Bluetooth devices.
-
stopScan(
) → Future< void> - Stop scanning for devices.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ BtServicePlatform
-
The default instance of BtServicePlatform to use.
getter/setter pair