BarcodeView.symbol constructor
BarcodeView.symbol(
- BarcodeSymbol symbol, {
- Key? key,
- BarcodeStyle style = BarcodeStyle.classic,
- double? width,
- double? height,
- String? semanticLabel,
Draws a BarcodeSymbol as it is: the modules a reader sampled from a
code (Barcode.symbol), or a symbol from BarcodeWriter.encode or
BarcodeStyle.encode. Nothing is encoded, so the code shown is
exactly the one read.
final BarcodeSymbol? symbol = capture.barcode.symbol;
if (symbol != null) BarcodeView.symbol(symbol, width: 56);
In debug mode, asserts that a QR code under a BarcodeStyle.logo has
the error correction the logo needs; encode it with
BarcodeStyle.encode to get it.
Implementation
BarcodeView.symbol(
BarcodeSymbol this.symbol, {
super.key,
this.style = BarcodeStyle.classic,
this.width,
this.height,
this.semanticLabel,
}) : data = symbol.text,
bytes = null,
writer = null,
errorBuilder = null;