PrinterTextParserImg constructor
PrinterTextParserImg(})
Implementation
PrinterTextParserImg(
PrinterTextParserColumn printerTextParserColumn,
String textAlign,
HashMap<String, String> imageAttributes, {
String? hexadecimalString,
Uint8List? bytes,
}) {
Uint8List image = Uint8List(0);
if (hexadecimalString != null) {
image = PrinterTextParserImg.hexadecimalStringToBytes(hexadecimalString);
}
if (bytes != null) {
image = bytes;
}
_align = EscPosPrinterCommands.textAlignLeft;
switch (textAlign) {
case PrinterTextParser.tagsAlignCenter:
_align = EscPosPrinterCommands.textAlignCenter;
break;
case PrinterTextParser.tagsAlignRight:
_align = EscPosPrinterCommands.textAlignRight;
break;
}
_image = image;
}