toAddress static method

Future<BluetoothConnection> toAddress(
  1. String? address
)

Returns connection to given address.

Implementation

static Future<BluetoothConnection> toAddress(String? address) async {
  // Sorry for pseudo-factory, but `factory` keyword disallows `Future`.
  return BluetoothConnection._consumeConnectionID(await FlutterBluetoothSerial
      ._methodChannel
      .invokeMethod('connect', {"address": address}));
}