printDoubleQR method

  1. @override
Future<void> printDoubleQR({
  1. required IminDoubleQRCodeStyle qrCode1,
  2. required IminDoubleQRCodeStyle qrCode2,
  3. int? doubleQRSize,
})
override

Implementation

@override
Future<void> printDoubleQR(
    {required IminDoubleQRCodeStyle qrCode1,
    required IminDoubleQRCodeStyle qrCode2,
    int? doubleQRSize}) async {
  Map<String, dynamic> arguments = <String, dynamic>{
    "qrCode1Text": qrCode1.text,
    "qrCode2Text": qrCode2.text
  };
  if (qrCode1.leftMargin != null) {
    await setDoubleQR1MarginLeft(qrCode1.leftMargin!);
  }
  if (qrCode2.leftMargin != null) {
    await setDoubleQR2MarginLeft(qrCode2.leftMargin!);
  }
  if (qrCode1.level != null) {
    await setDoubleQR1Level(qrCode1.level!);
  }
  if (qrCode2.level != null) {
    await setDoubleQR2Level(qrCode2.level!);
  }
  if (qrCode1.version != null) {
    await setDoubleQR1Version(qrCode1.version!);
  }
  if (qrCode2.version != null) {
    await setDoubleQR2Version(qrCode2.version!);
  }
  if (doubleQRSize != null) {
    await setDoubleQRSize(doubleQRSize);
  }

  await methodChannel.invokeMethod<void>('printDoubleQR', arguments);
}