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)),
- Color? color = _qrDefaultColor,
- 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(
QRVersion.isSupportedVersion(version),
'QR code version $version is not supported',
) {
_init(data);
}