connectBluetoothDevice method

  1. @override
Future<bool> connectBluetoothDevice({
  1. required EspBluetoothDevice device,
})
override

Implementation

@override
Future<bool> connectBluetoothDevice({
  required EspBluetoothDevice device,
}) async {
  try {
    final result = await methodChannel.invokeMethod<bool>('connectBLEDevice', {
          'service_uuid': device.serviceUuid,
        }) ??
        false;

    return result;
  } on PlatformException catch (e) {
    throw _onPlatformException(e);
  } catch (e) {
    rethrow;
  }
}