addDoubleText method

void addDoubleText(
  1. String leftValue,
  2. String rightValue, {
  3. dynamic leftWidth = 6,
  4. dynamic rightWidth = 6,
})

Implementation

void addDoubleText(String leftValue, String rightValue, {leftWidth = 6, rightWidth = 6}) {
  List<int> bytes = generator.row([
    PosColumn(
      text: leftValue,
      width: leftWidth,
      styles: PosStyles(align: PosAlign.left),
    ),
    PosColumn(
      text: rightValue,
      width: rightWidth,
      styles: PosStyles(align: PosAlign.right),
    ),
  ]);

  this.bytes.add(Uint8List.fromList(bytes));
}