printText method
Prints a text string.
textData – the text to print.
x, y – label origin coordinates.
type – font type (0–6 = standard, 7 = Chinese).
orientation – rotation: N, R, I, or B.
size – font size (1=10px … 6=60px).
Implementation
Future<String?> printText(
String textData, {
String x = '0',
String y = '0',
int type = 0,
String orientation = 'N',
int size = 3,
}) async {
try {
final String? result = await _channel.invokeMethod('printText', {
'textData': textData,
'x': x,
'y': y,
'type': type,
'orientation': orientation,
'size': size,
});
return result;
} on PlatformException catch (e) {
throw 'Failed to print text: ${e.message}';
}
}