QrImageView.withQr constructor
QrImageView.withQr({
- required QrCode qr,
- Key? key,
- Color? circleColor,
- double? size,
- EdgeInsets padding = const EdgeInsets.all(10.0),
- Color backgroundColor = Colors.transparent,
- @Deprecated('use colors in eyeStyle and dataModuleStyle instead') Color foregroundColor = Colors.black,
- int version = QrVersions.auto,
- int errorCorrectionLevel = QrErrorCorrectLevel.L,
- QrErrorBuilder? errorStateBuilder,
- bool constrainErrorBounds = true,
- bool gapless = true,
- bool drawCircle = false,
- ImageProvider<
Object> ? embeddedImage, - QrEmbeddedImageStyle embeddedImageStyle = const QrEmbeddedImageStyle(),
- String semanticsLabel = 'qr code',
- QrEyeStyle eyeStyle = const QrEyeStyle(eyeShape: QrEyeShape.square, color: Colors.black),
- QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(dataModuleShape: QrDataModuleShape.square, color: Colors.black),
- bool embeddedImageEmitsError = false,
- Gradient? gradient,
Create a new QR code using the QrCode data and the passed options (or using the default options).
Implementation
QrImageView.withQr({
required QrCode qr,
super.key,
this.circleColor,
this.size,
this.padding = const EdgeInsets.all(10.0),
this.backgroundColor = Colors.transparent,
@Deprecated('use colors in eyeStyle and dataModuleStyle instead')
this.foregroundColor = Colors.black,
this.version = QrVersions.auto,
this.errorCorrectionLevel = QrErrorCorrectLevel.L,
this.errorStateBuilder,
this.constrainErrorBounds = true,
this.gapless = true,
this.drawCircle = false,
this.embeddedImage,
this.embeddedImageStyle = const QrEmbeddedImageStyle(),
this.semanticsLabel = 'qr code',
this.eyeStyle = const QrEyeStyle(
eyeShape: QrEyeShape.square,
color: Colors.black,
),
this.dataModuleStyle = const QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.square,
color: Colors.black,
),
this.embeddedImageEmitsError = false,
this.gradient,
}) : assert(
QrVersions.isSupportedVersion(version),
'QR code version $version is not supported',
),
_data = null,
_qrCode = qr;