printQRCode method Null safety

Future<int> printQRCode(
  1. String text,
  2. {ElginQrcodeSize size = ElginQrcodeSize.SIZE4,
  3. ElginAlign align = ElginAlign.CENTER,
  4. 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;
  return await platform?.invokeMethod("printQrcode", {'qrcodeArgs': mapParam});
}