ScannerView constructor
const
ScannerView({
- Key? key,
- CameraLensFacing? lensFacing,
- Color? flashOnColor,
- Color? flashOffColor,
- double topRatio = 0.3,
- double leftRatio = 0.1,
- double widthRatio = 0.8,
- double heightRatio = 0.4,
- bool bestFit = true,
- double? hornStrokeWidth,
- double? scannerStrokeWidth,
- bool scannerBox = true,
- ValueChanged<
String> ? scanResult, - Widget? child,
- String? flashText,
- CameraResolution? resolution,
- Color? borderColor,
- Color? scannerColor,
Implementation
const ScannerView({
Key? key,
CameraLensFacing? lensFacing,
Color? flashOnColor,
Color? flashOffColor,
this.topRatio = 0.3,
this.leftRatio = 0.1,
this.widthRatio = 0.8,
this.heightRatio = 0.4,
this.bestFit = true,
this.hornStrokeWidth,
this.scannerStrokeWidth,
this.scannerBox = true,
this.scanResult,
this.child,
this.flashText,
this.resolution,
this.borderColor,
this.scannerColor,
}) : lensFacing = lensFacing ?? CameraLensFacing.back,
flashOnColor = flashOnColor ?? Colors.white,
flashOffColor = flashOffColor ?? Colors.black26,
assert(leftRatio * 2 + widthRatio == 1),
assert(topRatio * 2 + heightRatio == 1),
super(key: key);