connectToPrinter method

  1. @override
Future<bool> connectToPrinter(
  1. String address
)
override

Implementation

@override
Future<bool> connectToPrinter(String address) async {
  status = PrinterStatus.connecting;
  notifier(this);
  final bool result = await channel.invokeMethod("connectToPrinter", {"address": address});
  if (result) {
    print("result is true");
    status = PrinterStatus.ready;
    log("Zebra Instance $instanceID Connected to $address");
    notifier(this);
    return result;
  } else {
    print("result is false");
    status = PrinterStatus.disconnected;
    notifier(this);
    return result;
  }
}