addText method

void addText(
  1. String text, {
  2. int fontSize = 24,
  3. PrinterAlignment alignment = PrinterAlignment.left,
})

Implementation

void addText(String text, {int fontSize = 24, PrinterAlignment alignment = PrinterAlignment.left}) {
  commands.add({
    'type': 'text',
    'value': text,
    'fontSize': fontSize,
    'alignment': alignment.index,
  });
}