getPrinters method

Future<List<Printer>> getPrinters()

Returns the list of available printers on the device. This includes manually added, enterprise and discovered printers.

Implementation

Future<List<Printer>> getPrinters() async {
  var $res =
      await promiseToFuture<JSArray>($js.chrome.printing.getPrinters());
  return $res.toDart
      .cast<$js.Printer>()
      .map((e) => Printer.fromJS(e))
      .toList();
}