onPrinterDiscovered method
void
onPrinterDiscovered()
Registers a callback function to listen for discovered printers during the discovery process.
callback
: A function that will be called when a printer is discovered. The function receives the following parameters:identifier
: The unique identifier of the discovered printer.interfaceType
: The connection interface type (e.g., USB, Bluetooth).model
: The model name of the discovered printer.
Throws an UnimplementedError if the method is not implemented by the platform.
Implementation
void onPrinterDiscovered(
Function(String identifier, String interfaceType, String model)
callback) {
throw UnimplementedError('onPrinterDiscovered() has not been implemented.');
}