connectBleDevice method
Initiates a connection attempt to a specific BLE device.
deviceAddress
: The MAC address of the target BLE device. Listen to streamBleConnectionState for connection status updates and streamBleReceivedData for data received from the device. Returns a Future that completes when the connection attempt is initiated.
Implementation
@override
Future<void> connectBleDevice(String deviceAddress) async {
await methodChannel.invokeMethod(
'ble#connect',
{'deviceAddress': deviceAddress},
);
}