BluetoothConnectionPluginPlatform class abstract
- Inheritance
-
- Object
- PlatformInterface
- BluetoothConnectionPluginPlatform
- Implementers
Constructors
- BluetoothConnectionPluginPlatform.new()
- Constructs a BluetoothConnectionPluginPlatform.
Properties
-
classicConnectionEvents
→ Stream<
ClassicConnectionEvent> -
Stream of Classic Bluetooth connection events
no setter
-
classicDataEvents
→ Stream<
ClassicDataEvent> -
Stream of Classic Bluetooth data events
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onDataReceived
→ Stream<
DataEvent> -
Stream of received data from BLE device
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connect(
String deviceAddress) → Stream< ConnectionEvent> - Connect to a BLE device Returns a stream of connection events
-
connectToDevice(
String deviceAddress) → Future< Map< String, dynamic> > - Connect to a Bluetooth device by address
-
disconnect(
) → Future< void> - Disconnect from current BLE device
-
disconnectDevice(
) → Future< Map< String, dynamic> > - Disconnect from the current device
-
getBleConnectionState(
) → Future< ConnectionState> - Get current BLE connection state
-
getConnectedDevice(
) → Future< String?> - Get currently connected BLE device address
-
getConnectionState(
) → Future< Map< String, dynamic> > - Get detailed connection state
-
getPairedDevices(
) → Future< List< Map< >String, dynamic> > - Get a list of paired Bluetooth devices
-
getPlatformVersion(
) → Future< String?> -
hasPermissions(
) → Future< bool> - Check if required BLE permissions are granted
-
isBluetoothEnabled(
) → Future< bool> - Check if Bluetooth is enabled
-
isConnected(
) → Future< bool> - Check if a device is currently connected
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readData(
) → Future< Map< String, dynamic> > - Read data from the connected device
-
requestPermissions(
) → Future< bool> - Request required BLE permissions
-
sendBleData(
String data) → Future< bool> - Send data to connected BLE device
-
sendData(
String data) → Future< Map< String, dynamic> > - Send data to the connected device
-
startDataStreaming(
) → Future< Map< String, dynamic> > - Start continuous data streaming
-
startScan(
{Duration? timeout, List< String> ? serviceUuids}) → Stream<ScanEvent> - Start scanning for BLE devices Returns a stream of discovered devices
-
stopDataStreaming(
) → Future< Map< String, dynamic> > - Stop continuous data streaming
-
stopScan(
) → Future< void> - Stop scanning for BLE devices
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ BluetoothConnectionPluginPlatform
-
The default instance of BluetoothConnectionPluginPlatform to use.
getter/setter pair