discoverPrinters function
Future<List<PrinterDiscovered> >
discoverPrinters({
- List<
DiscoverResult Function()> modes = const [discoverStarPrinter, UsbPrinterConnector.discoverPrinters, BluetoothPrinterConnector.discoverPrinters, TcpPrinterConnector.discoverPrinters],
Implementation
Future<List<PrinterDiscovered>> discoverPrinters(
{List<DiscoverResult Function()> modes = const [
discoverStarPrinter,
UsbPrinterConnector.discoverPrinters,
BluetoothPrinterConnector.discoverPrinters,
TcpPrinterConnector.discoverPrinters
]}) async {
List<PrinterDiscovered> result = [];
await Future.wait(modes.map((m) async {
result.addAll(await m());
}));
return result;
}