printQrCode method

  1. @override
Future<void> printQrCode(
  1. String code, {
  2. int unitSize = 5,
  3. QRErrLevel errLevel = QRErrLevel.L,
  4. PStringEncoding encoding = PStringEncoding.utf8,
})
override

Prints a QR code with the given data.

Parameters:

  • code The data to encode in the QR code.
  • unitSize Size of the QR code units.
  • errLevel Error correction level.
  • encoding String encoding used.

Implementation

@override
Future<void> printQrCode(
  String code, {
  int unitSize = 5,
  QRErrLevel errLevel = QRErrLevel.L,
  PStringEncoding encoding = PStringEncoding.utf8,
}) {
  final args = {
    'code': code,
    'unitSize': unitSize,
    'errLevel': errLevels[errLevel],
    'encoding': encoding.index,
  };

  return methodChannel.invokeMethod<void>('printQrCode', args);
}