getQrCorrectionLevel static method

int getQrCorrectionLevel(
  1. dynamic qrCorrectionLevel
)

Get the QR error correction level

Default value is 'low'.

Implementation

static int getQrCorrectionLevel(qrCorrectionLevel) {
  switch (qrCorrectionLevel) {
    case 'low':
      return QrErrorCorrectLevel.L;
    case 'medium':
      return QrErrorCorrectLevel.M;
    case 'quartile':
      return QrErrorCorrectLevel.Q;
    case 'high':
      return QrErrorCorrectLevel.H;
    default:
      return QrErrorCorrectLevel.L;
  }
}