pair method
void
pair({})
Pair this device manager with a BLE device by specifying the bleAddress,
and optionally its bleName, serviceUuids, and manufacturerData.
Implementation
@nonVirtual
void pair({
required String bleAddress,
String? bleName,
List<String>? serviceUuids,
List<int>? manufacturerData,
}) {
this.bleAddress = bleAddress;
this.bleName = bleName;
this.serviceUuids = serviceUuids ?? [];
this.manufacturerData = manufacturerData ?? [];
if (onPaired()) {
status = DeviceStatus.paired;
info('$runtimeType - Paired with BLE device: $bleAddress');
} else {
warning('$runtimeType - Failed to pair with BLE device: $bleAddress');
}
}