printCustomText static method
Prints custom text using a SunmiText object.
sunmiText
: The text and style to print.
Returns a String indicating the result of the print operation, or null
.
Implementation
static Future<String?> printCustomText({required SunmiText sunmiText}) async {
final printData = {
"text": sunmiText.text,
if (sunmiText.style != null) ...sunmiText.style!.toMap(),
};
return await SunmiPrinterPlusPlatform.instance.printText(printData);
}