printQrCode method

  1. @override
Future<Map<String, dynamic>> printQrCode(
  1. String data, {
  2. int size = 200,
  3. String errorCorrectionLevel = "L",
})
override

Implementation

@override
 Future<Map<String, dynamic>> printQrCode(
   String data, {
   int size = 200,
   String errorCorrectionLevel = "L", // "L", "M", "Q", "H"
 }) async {
   try {
     final Map<String, dynamic> result = Map<String, dynamic>.from(
       await channel.invokeMethod('printQRCode', {
         'data': data,
         'size': size,
         'errorCorrectionLevel': errorCorrectionLevel,
       })
     );
     return result;
   } on PlatformException catch (e) {
     throw SmartPosException('Failed to print QR code: ${e.message}');
   }
 }