printText method
void
printText(
- String text, {
- String charset = "gbk",
- BoldMode? bold,
- UnderlineMode? underline,
- FontType? fontType,
- FontSize? fontSize,
- PrintAlignment? alignment,
Implementation
void printText(
String text, {
String charset = "gbk",
BoldMode? bold,
UnderlineMode? underline,
FontType? fontType,
FontSize? fontSize,
PrintAlignment? alignment,
}) {
_commands.addAll([
if (alignment != null) SetPrintAlignment(alignment: alignment),
if (bold != null) SetBold(mode: bold),
if (underline != null) SetUnderline(mode: underline),
if (fontType != null) SetFontType(fontType: fontType),
if (fontSize != null) SetFontSize(fontSize: fontSize),
PrintText(text: text, charset: charset),
]);
}