sendBinary method

Future<PrinterStatus> sendBinary(
  1. Uint8List data
)

Send the binary data 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> sendBinary(Uint8List data) async {

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

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

  return status;
}