connect method

Connect the GATT server to the device.

This Future will only complete once an error happens or the connection is made.

To cancel connecting call disconnect.

  • May throw NetworkError if no connection could be established.

  • May throw AbortError if the attempt was aborted.

See:

Implementation

Future<NativeBluetoothRemoteGATTServer> connect() async {
  final promise = _JSUtil.callMethod(_jsObject, "connect", []);
  await _JSUtil.promiseToFuture(promise);
  return this;
}