connectToPrinter method

  1. @override
Future<bool> connectToPrinter(
  1. String ipAddress, {
  2. int portNumber = 9100,
})
override

Implementation

@override
Future<bool> connectToPrinter(String ipAddress,
    {int portNumber = 9100}) async {
  try {
    return await methodChannel.invokeMethod("connectToPrinterWithIP",
        {"printerId": ipAddress, "portNumber": portNumber});
  } catch (e) {
    print("There is an issue while connecting to the printer $e");
    return false;
  }
}