getBluetoothPrinters method

Future<List<BluetoothPrinter>> getBluetoothPrinters(
  1. List<String> modelName
)

Returns the paried printers matching the model name specified.

Implementation

Future<List<BluetoothPrinter>> getBluetoothPrinters(List<String> modelName) async {

  var params = {
    "printerId": mPrinterId,
    "printInfo": mPrinterInfo.toMap(),
    "models" : modelName,
  };

  final List<dynamic> resultList = await _channel.invokeMethod("getBluetoothPrinters", params);

  final List<BluetoothPrinter> outList = resultList.map( (bluetoothPrinter) => BluetoothPrinter.fromMap(bluetoothPrinter)).toList();
  return outList;
}