BarcodeKitView constructor
const
BarcodeKitView({
- required void onBarcodeScanned(
- DetectedBarcode barcode
- required BarcodeKitUiBuilder uiBuilder,
- required Set<
BarcodeFormat> formats, - void onTextDetected(
- String detectedText
- Color backdropColor = Colors.black,
- Widget barcodeOverlayBuilder(
- BuildContext context,
- DetectedBarcode barcode
- bool paused = false,
- bool mask = true,
- double maskHeight = 200,
- double maskWidth = 200,
- double pauseBlurAmount = 10,
- double pauseZoomAmount = 0.2,
- bool followRotation = true,
- List<
Widget> ? children, - BoxFit cameraFit = BoxFit.cover,
- bool enableOCR = false,
- CameraLensDirection direction = CameraLensDirection.back,
- List<
CameraLensDirection> fallbackDirections = const [CameraLensDirection.front], - Widget? widgetAboveMask,
- Widget? widgetBelowMask,
- double maskAdditionpauseOpacity = 0.1,
- Key? key,
Create a new BarcodeKitView
Implementation
const BarcodeKitView({
required this.onBarcodeScanned,
required this.uiBuilder,
required this.formats,
this.onTextDetected,
this.backdropColor = Colors.black,
this.barcodeOverlayBuilder = defaultBarcodeOverlayBuilder,
this.paused = false,
this.mask = true,
this.maskHeight = 200,
this.maskWidth = 200,
this.pauseBlurAmount = 10,
this.pauseZoomAmount = 0.2,
this.followRotation = true,
this.children,
this.cameraFit = BoxFit.cover,
this.enableOCR = false,
this.direction = CameraLensDirection.back,
this.fallbackDirections = const [CameraLensDirection.front],
this.widgetAboveMask,
this.widgetBelowMask,
this.maskAdditionpauseOpacity = 0.1,
super.key,
});