UniversalScannerView class

Main camera viewfinder widget supporting mode switching, gallery picks, reticle overlays, and complete screen layout customization.

Inheritance

Constructors

UniversalScannerView({Key? key, ScannerController? controller, ScanMode initialMode = ScanMode.qr, List<ScanMode>? enabledModes, bool enableQr = true, bool enableBarcode = true, bool enablePdf417 = true, bool enablePassport = true, bool enableAadhaar = true, bool enablePan = true, bool enableDrivingLicense = true, bool enableVin = true, bool enableOcr = true, bool enableFace = true, bool enableDocument = true, bool enableInvoice = true, bool enableReceipt = true, bool enableBusinessCard = true, bool enableMultiCode = true, bool enableCheque = true, bool enableIdCard = true, bool enableLicensePlate = true, ScannerUiTheme? theme, Color? primaryAccentColor, Color? backgroundColor, Color? modeSelectorBackgroundColor, Color? overlayMaskColor, Color? laserBeamColor, bool? showModeBadge, bool? showGuideBox, bool? showLaserBeam, bool autoShowResultBottomSheet = true, dynamic onResultDetected(ScanResult result)?, Widget overlayBuilder(BuildContext context, ScannerController controller)?})
Constructs a new UniversalScannerView with default pre-packaged SDK layout.
const
UniversalScannerView.builder({Key? key, required UniversalScannerBuilder? builder, ScannerController? controller, ScanMode initialMode = ScanMode.qr, List<ScanMode>? enabledModes, bool enableQr = true, bool enableBarcode = true, bool enablePdf417 = true, bool enablePassport = true, bool enableAadhaar = true, bool enablePan = true, bool enableDrivingLicense = true, bool enableVin = true, bool enableOcr = true, bool enableFace = true, bool enableDocument = true, bool enableInvoice = true, bool enableReceipt = true, bool enableBusinessCard = true, bool enableMultiCode = true, bool enableCheque = true, bool enableIdCard = true, bool enableLicensePlate = true, ScannerUiTheme? theme, Color? primaryAccentColor, Color? backgroundColor, Color? modeSelectorBackgroundColor, Color? overlayMaskColor, Color? laserBeamColor, bool? showModeBadge, bool? showGuideBox, bool? showLaserBeam, bool autoShowResultBottomSheet = true, dynamic onResultDetected(ScanResult result)?, Widget overlayBuilder(BuildContext context, ScannerController controller)?})
Constructs a UniversalScannerView using a custom builder to create a custom screen design.
const

Properties

activeEnabledModes → List<ScanMode>
Resolves active scanning modes enabled for this widget.
no setter
autoShowResultBottomSheet → bool
Whether to automatically show ResultBottomSheet upon scanning a valid result.
final
backgroundColor → Color?
Scanner viewport container background color.
final
builder → UniversalScannerBuilder?
Optional builder for rendering custom screen designs and UI layouts.
final
controller → ScannerController?
Optional custom controller for standalone functionality and state management.
final
enableAadhaar → bool
Whether Indian Aadhaar Card scanning mode is enabled.
final
enableBarcode → bool
Whether 1D Barcode scanning mode is enabled.
final
enableBusinessCard → bool
Whether Business Card mode is enabled.
final
enableCheque → bool
Whether Bank Cheque MICR mode is enabled.
final
enabledModes → List<ScanMode>?
Optional explicit list of enabled scanning modes.
final
enableDocument → bool
Whether Document Scanner mode is enabled.
final
enableDrivingLicense → bool
Whether Driving License scanning mode is enabled.
final
enableFace → bool
Whether Face Detection mode is enabled.
final
enableIdCard → bool
Whether generic ID Card scanning mode is enabled.
final
enableInvoice → bool
Whether Invoice OCR mode is enabled.
final
enableLicensePlate → bool
Whether License Plate scanning mode is enabled.
final
enableMultiCode → bool
Whether Multi-Code scanning mode is enabled.
final
enableOcr → bool
Whether Text OCR scanning mode is enabled.
final
enablePan → bool
Whether Income Tax PAN Card scanning mode is enabled.
final
enablePassport → bool
Whether Passport MRZ scanning mode is enabled.
final
enablePdf417 → bool
Whether PDF417 barcode scanning mode is enabled.
final
enableQr → bool
Whether QR Code scanning mode is enabled.
final
enableReceipt → bool
Whether Receipt OCR mode is enabled.
final
enableVin → bool
Whether Vehicle VIN scanning mode is enabled.
final
hashCode → int
The hash code for this object.
no setterinherited
initialMode → ScanMode
Initial mode when the scanner opens.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
laserBeamColor → Color?
Color of animated scanning laser beam.
final
modeSelectorBackgroundColor → Color?
Mode selection bottom bar background color.
final
onResultDetected → dynamic Function(ScanResult result)?
Optional callback invoked when a valid ScanResult is detected.
final
overlayBuilder → Widget Function(BuildContext context, ScannerController controller)?
Optional builder signature for creating custom overlay widgets.
final
overlayMaskColor → Color?
Background dimming color outside camera viewfinder cutout.
final
primaryAccentColor → Color?
Primary accent color for viewfinder reticle, selected mode, and highlight lines.
final
resolvedTheme → ScannerUiTheme
Resolves effective ScannerUiTheme merging theme and individual color overrides.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showGuideBox → bool?
Whether to display top floating guidance text box.
final
showLaserBeam → bool?
Whether to display animated scanning laser beam.
final
showModeBadge → bool?
Whether to display top active mode badge chip.
final
theme → ScannerUiTheme?
Optional theme configuration for customizing UI design and colors.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<UniversalScannerView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited