QrImageView constructor
QrImageView({
- required String data,
- Key? key,
- double? size,
- EdgeInsets padding = const EdgeInsets.all(10.0),
- Color backgroundColor = Colors.transparent,
- int version = QrVersions.auto,
- int errorCorrectionLevel = QrErrorCorrectLevel.L,
- QrErrorBuilder? errorStateBuilder,
- bool constrainErrorBounds = true,
- bool gapless = true,
- ImageProvider<
Object> ? embeddedImage, - QrEmbeddedImageStyle? embeddedImageStyle,
- 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,
- @Deprecated('use colors in eyeStyle and dataModuleStyle instead') Color? foregroundColor,
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.padding = const EdgeInsets.all(10.0),
this.backgroundColor = Colors.transparent,
this.version = QrVersions.auto,
this.errorCorrectionLevel = QrErrorCorrectLevel.L,
this.errorStateBuilder,
this.constrainErrorBounds = true,
this.gapless = true,
this.embeddedImage,
this.embeddedImageStyle,
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,
@Deprecated('use colors in eyeStyle and dataModuleStyle instead')
this.foregroundColor,
}) : assert(
QrVersions.isSupportedVersion(version),
'QR code version $version is not supported',
),
_data = data,
_qrCode = null;