connect method

  1. @override
Future<bool> connect(
  1. String deviceId, {
  2. bool bypassWhitelist = false,
})
override

Connect to a printer by device id. bypassWhitelist (Android only) uses reflection to bypass SDK device name whitelist check.

Implementation

@override
Future<bool> connect(String deviceId, {bool bypassWhitelist = false}) async {
  final result = await _methodChannel.invokeMethod<bool>('connect', {
    'deviceId': deviceId,
    'bypassWhitelist': bypassWhitelist,
  });
  return result ?? false;
}