printPaper method
Implementation
@override
Future<PrintResponse> printPaper(MyPosPaper data) async {
final Map<String, dynamic> args = {
'data': data.commands
};
final res = await methodChannel.invokeMethod<String>('printPaper', args);
switch (res) {
case 'SUCCESS':
return PrintResponse.success;
case 'FAILED':
return PrintResponse.failed;
case 'OUT_OF_PAPER':
return PrintResponse.outOfPaper;
case 'UNKNOWN':
return PrintResponse.unknown;
}
return PrintResponse.unknown;
}