QrPainter constructor
QrPainter({
- required String data,
- required int version,
- int errorCorrectionLevel = QrErrorCorrectLevel.L,
- bool gapless = false,
- Image? embeddedImage,
- QrEmbeddedImageStyle? embeddedImageStyle,
- QrEyeStyle eyeStyle = const QrEyeStyle(eyeShape: QrEyeShape.square, color: Color(0xFF000000)),
- QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(dataModuleShape: QrDataModuleShape.square, color: Color(0xFF000000)),
- @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,
Create a new QRPainter with passed options (or defaults).
Implementation
QrPainter({
required String data,
required this.version,
this.errorCorrectionLevel = QrErrorCorrectLevel.L,
this.gapless = false,
this.embeddedImage,
this.embeddedImageStyle,
this.eyeStyle = const QrEyeStyle(
eyeShape: QrEyeShape.square,
color: Color(0xFF000000),
),
this.dataModuleStyle = const QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.square,
color: Color(0xFF000000),
),
@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,
}) : assert(
QrVersions.isSupportedVersion(version),
'QR code version $version is not supported',
) {
_init(data);
}