sendBinaryFile method

Future<PrinterStatus> sendBinaryFile(
  1. String filepath
)

Send the binary file containing the command. Since the status check is not performed, it is sent even if the printer specified by printerModel is different from the actually connected printer.

Implementation

Future<PrinterStatus> sendBinaryFile(String filepath) async {
  var params = {
    "printerId": mPrinterId,
    "printInfo": mPrinterInfo.toMap(),
    "filePath" : filepath,
  };

  final Map resultMap = await _channel.invokeMethod("sendBinaryFile", params);
  PrinterStatus status = PrinterStatus.fromMap(resultMap);

  return status;

}