printText static method
Prints plain text with an optional SunmiTextStyle.
text
: The text to print.
style
: The optional style for the text.
Returns a String indicating the result of the print operation, or null
.
Implementation
static Future<String?> printText(String text, {SunmiTextStyle? style}) async {
final printData = {
"text": text,
if (style != null) ...style.toMap(),
};
return await SunmiPrinterPlusPlatform.instance.printText(printData);
}