connectBluetoothDevice method

Future<bool> connectBluetoothDevice(
  1. String deviceName
)

Used to connect to the ble device.

Requires btdevice plugin.

Implementation

Future<bool> connectBluetoothDevice(String deviceName) async {
  // In Android we have to pass deviceName to functionality, in iOS - to a native function.
  instance.functionality.btDeviceName = deviceName;
  return await _bridge.invokeMethod("connectBluetoothDevice", [deviceName]);
}