QrImageView constructor
QrImageView({
- required String data,
- Key? key,
- double? size,
- bool drawCircle = false,
- Color? circleColor,
- 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,
- ImageProvider<
Object> ? embeddedImage, - QrEmbeddedImageStyle embeddedImageStyle = const QrEmbeddedImageStyle(),
- String semanticsLabel = 'qr code',
- QrEyeStyle eyeStyle = const QrEyeStyle(eyeShape: QrEyeShape.square),
- QrDataModuleStyle dataModuleStyle = const QrDataModuleStyle(dataModuleShape: QrDataModuleShape.square),
- bool embeddedImageEmitsError = false,
- Gradient? gradient,
Create a new QR code using the String data and the passed options (or using the default options).
Implementation
QrImageView({
required String data,
super.key,
this.size,
this.drawCircle = false,
this.circleColor,
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.embeddedImage,
this.embeddedImageStyle = const QrEmbeddedImageStyle(),
this.semanticsLabel = 'qr code',
this.eyeStyle = const QrEyeStyle(
eyeShape: QrEyeShape.square,
),
this.dataModuleStyle = const QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.square,
),
this.embeddedImageEmitsError = false,
this.gradient,
}) : assert(
QrVersions.isSupportedVersion(version),
'QR code version $version is not supported',
),
_data = data,
_qrCode = null;