getPrinters method
getPrinters() returns a List of Strings representing the printer names that have been discovered via the discovery scan. Items from this list will only be removed on subsequent launches of the app.
Implementation
@override
Future<List<String?>> getPrinters() async {
String? printerNames =
await methodChannel.invokeMethod<String>('getPrinters');
List<String> printerNamesList = printerNames!.split(', ');
printerNamesList.removeLast();
return printerNamesList;
}