isConnected method
Implementation
@override
Future<bool> isConnected({required Printer printer}) async {
switch (printer.type) {
case PrinterType.usb:
return _usbLookup(printer)?.opened ?? false;
case PrinterType.bluetooth:
final device = _bleLookup(printer);
return device == null ? false : bleConnected(device);
case PrinterType.network:
return false;
}
}