QrPainter constructor
QrPainter({
- required String data,
- required int version,
- bool drawCircle = false,
- int errorCorrectionLevel = QrErrorCorrectLevel.L,
- @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,
- Image? embeddedImage,
- Color? circleColor,
- QrEmbeddedImageStyle embeddedImageStyle = const QrEmbeddedImageStyle(),
- QrEyeStyle eyeStyle = const QrEyeStyle(),
- QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(),
- 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);
}