QrPainter constructor

QrPainter({
  1. required String data,
  2. required int version,
  3. bool drawCircle = false,
  4. int errorCorrectionLevel = QrErrorCorrectLevel.L,
  5. @Deprecated('use colors in eyeStyle and dataModuleStyle instead') Color color = _qrDefaultColor,
  6. @Deprecated('You should use the background color value of your container widget') Color emptyColor = _qrDefaultEmptyColor,
  7. bool gapless = false,
  8. Image? embeddedImage,
  9. Color? circleColor,
  10. QrEmbeddedImageStyle embeddedImageStyle = const QrEmbeddedImageStyle(),
  11. QrEyeStyle eyeStyle = const QrEyeStyle(),
  12. QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(),
  13. Gradient? gradient,
})

Create a new QRPainter with passed options (or defaults).

Implementation

QrPainter({
  required String data,
  required this.version,
  this.drawCircle = false,
  this.errorCorrectionLevel = QrErrorCorrectLevel.L,
  @Deprecated('use colors in eyeStyle and dataModuleStyle instead')
      this.color = _qrDefaultColor,
  @Deprecated(
    'You should use the background color value of your container widget',
  )
      this.emptyColor = _qrDefaultEmptyColor,
  this.gapless = false,
  this.embeddedImage,
  this.circleColor,
  this.embeddedImageStyle = const QrEmbeddedImageStyle(),
  this.eyeStyle = const QrEyeStyle(),
  this.dataModuleStyle = const QrDataModuleStyle(),
  this.gradient,
}) : assert(
        QrVersions.isSupportedVersion(version),
        'QR code version $version is not supported',
      ) {
  _init(data);
}