connectBleDevice method

  1. @override
Future<void> connectBleDevice(
  1. String deviceAddress
)
override

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},
  );
}