disconnect method

Future<int?> disconnect()

*disconnect

Disconnect the printer

Implementation

Future<int?> disconnect() async {
  int? disconnect =
      ((await platform?.invokeMethod('stopPrinter') ?? false) == false
      ? -1
      : 9999);
  if (disconnect < 0) {
    throw ElginException(disconnect);
  }

  return disconnect;
}