QrPainter.withQr constructor
QrPainter.withQr({
- required QrCode qr,
- @Deprecated('use colors in eyeStyle and dataModuleStyle instead') Color color = _qrDefaultColor,
- @Deprecated('You should use the background color value of your container widget') Color emptyColor = _qrDefaultEmptyColor,
- bool gapless = false,
- bool drawCircle = false,
- Image? embeddedImage,
- Color? circleColor,
- QrEmbeddedImageStyle embeddedImageStyle = const QrEmbeddedImageStyle(),
- QrEyeStyle eyeStyle = const QrEyeStyle(),
- QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(),
- Gradient? gradient,
Create a new QrPainter with a pre-validated/created QrCode object. This constructor is useful when you have a custom validation / error handling flow or for when you need to pre-validate the QR data.
Implementation
QrPainter.withQr({
required QrCode qr,
@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.drawCircle = false,
this.embeddedImage,
this.circleColor,
this.embeddedImageStyle = const QrEmbeddedImageStyle(),
this.eyeStyle = const QrEyeStyle(),
this.dataModuleStyle = const QrDataModuleStyle(),
this.gradient,
}) : _qr = qr,
version = qr.typeNumber,
errorCorrectionLevel = qr.errorCorrectLevel {
_calcVersion = version;
_initPaints();
}