printRow static method

Future<void> printRow(
  1. List<String> texts,
  2. List<int> width,
  3. List<SunmiPrintAlign> align
)

Prints a row of text

Implementation

static Future<void> printRow(
  List<String> texts,
  List<int> width,
  List<SunmiPrintAlign> align,
) async {
  final args = <String, dynamic>{
    "texts": jsonEncode(texts),
    "width": width.join(","),
    "align": align.map((e) => e.index).join(","),
  };
  await _channel.invokeMethod(commandPrintRow, args);
}