printQRCode method
Future<int>
printQRCode(
- String text, {
- ElginQrcodeSize size = ElginQrcodeSize.SIZE4,
- ElginAlign align = ElginAlign.CENTER,
- ElginQrcodeCorrection correction = ElginQrcodeCorrection.LEVEL_M,
*printQRCode
Print a qrcode with some correction
, align
and size
Implementation
Future<int> printQRCode(
String text, {
ElginQrcodeSize size = ElginQrcodeSize.SIZE4,
ElginAlign align = ElginAlign.CENTER,
ElginQrcodeCorrection correction = ElginQrcodeCorrection.LEVEL_M,
}) async {
await reset();
Map<String, dynamic> mapParam = new Map();
mapParam['size'] = size.value;
mapParam['align'] = align.value;
mapParam['correction'] = correction.value;
mapParam['text'] = text;
int? _qrcode =
await platform?.invokeMethod("printQrcode", {'qrcodeArgs': mapParam}) ??
9999;
if (_qrcode < 0) {
throw ElginException(_qrcode);
}
return _qrcode;
}