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": _printerId,
    "printInfo": _printerInfo.toMap(),
    "models": modelName,
  };

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

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