printLines method

bool printLines(
  1. List<String> data
)

Implementation

bool printLines(List<String> data) {
  var res = false;

  if (data.isEmpty) {
    return res;
  }

  final printerHandle = _startRawPrintJob(
      printerName: printerName,
      documentTitle: 'My document',
      dataType: 'RAW');

  res = _startRawPrintPage(printerHandle);

  for (final item in data) {
    if (res) {
      res = _printRawData(printerHandle, item);
    }
  }
  _endRawPrintPage(printerHandle);
  _endRawPrintJob(printerHandle);

  return res;
}