BarcodeView.symbol constructor

BarcodeView.symbol(
  1. BarcodeSymbol symbol, {
  2. Key? key,
  3. BarcodeStyle style = BarcodeStyle.classic,
  4. double? width,
  5. double? height,
  6. String? semanticLabel,
})

Draws a BarcodeSymbol as it is: the modules a reader sampled from a code (Barcode.symbol), or a symbol from BarcodeWriter.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);

Implementation

BarcodeView.symbol(
  BarcodeSymbol this.symbol, {
  super.key,
  this.style = BarcodeStyle.classic,
  this.width,
  this.height,
  this.semanticLabel,
}) : data = symbol.text,
     bytes = null,
     format = symbol.format,
     errorCorrection = null,
     showText = symbol.text != null,
     errorBuilder = null;