ScannerConfiguration class

Holds scanner configuration data. Contains both generic configuration data such as which formats are supported as well as optional camera configuration for scanners that use the camera. The camera data is provided as a hint, the actual implementation can choose alternatives and/or reasonable defaults.

This data class contains toMap/fromMap methods that return a map that is safe to use in platform channels (or state restoration)

Annotations

Constructors

ScannerConfiguration({required Set<BarcodeFormat> enableFormats, CameraConfiguration? cameraConfiguration, bool trimWhiteSpaces = false})
const
ScannerConfiguration.fromMap(Map<String, dynamic> map)
factory

Properties

cameraConfiguration CameraConfiguration?
Optional camera configuration object. This data is provided as a hint to the actual scanner and implementations can choose alternatives and/or reasonable defaults.
final
enableFormats Set<BarcodeFormat>
The list of enabled bar code formats. Formats outside this range SHOULD NOT be reported by the scanner in the callback
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trimWhiteSpaces bool
Whether to automatically trim leading and trailing whitespaces from the scanned code. Defaults to false.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override