discovery method
Stream<PrinterDevice>
discovery({
- required PrinterType type,
- bool isBle = false,
- TcpPrinterInput? model,
Implementation
Stream<PrinterDevice> discovery({required PrinterType type, bool isBle = false, TcpPrinterInput? model}) {
if (type == PrinterType.bluetooth && (Platform.isIOS || Platform.isAndroid)) {
return bluetoothPrinterConnector.discovery(isBle: isBle);
} else if (type == PrinterType.usb && (Platform.isAndroid || Platform.isWindows)) {
return usbPrinterConnector.discovery();
} else {
return tcpPrinterConnector.discovery(model: model);
}
}