printText method
Future<PrintResult>
printText(
- String text, {
- TextAlignment alignment = TextAlignment.left,
- bool cutPaper = true,
override
Imprime texto simples
Implementation
@override
Future<PrintResult> printText(
String text, {
TextAlignment alignment = TextAlignment.left,
bool cutPaper = true,
}) async {
final result = await methodChannel.invokeMethod<Map>('printText', {
'text': text,
'alignment': alignment.value,
'cutPaper': cutPaper,
});
if (result == null) {
return const PrintResult(success: false, resultCode: -1);
}
return PrintResult.fromMap(result);
}