discoverPrinters method

  1. @override
Future<String?> discoverPrinters()
override

Implementation

@override
discoverPrinters() async {
  bool permissions = await checkPermissions();
  if (permissions) {
    if(status != PrinterStatus.ready){
      status = PrinterStatus.discoveringPrinter;
      notifier(this);
    }

    String result = await channel.invokeMethod("discoverPrinters");
    // status = PrinterStatus.disconnected;
    // notifier(this);
    return result;
  }else{
    return "No Permission";
  }
}