connect static method

Future<bool> connect({
  1. required String address,
  2. String pin = '000000',
})

Connect to a beacon device using its MAC address and PIN.

  • address: MAC address of the device to connect to
  • pin: PIN code for authentication (default: '000000')

Returns true if connection was successful, false otherwise.

Implementation

static Future<bool> connect({
  required String address,
  String pin = '000000',
}) async {
  final ok = await _method.invokeMethod<bool>('connect', {
    'address': address,
    'pin': pin,
  });
  return ok ?? false;
}