DecodeHint class

Encapsulates a type of hint that a caller may pass to a barcode reader to help it more quickly or accurately decode it. It is up to implementations to decide what, if anything, to do with the information that is supplied.

Constructors

DecodeHint({Object? other, bool pureBarcode = false, List<BarcodeFormat>? possibleFormats, bool tryHarder = false, String? characterSet, List<int>? allowedLengths, bool assumeCode39CheckDigit = false, bool assumeGs1 = false, bool returnCodabarStartEnd = false, ResultPointCallback? needResultPointCallback, List<int>? allowedEanExtensions, bool alsoInverted = false})
const

Properties

allowedEanExtensions List<int>?
Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. Maps to an List<int> of the allowed extension lengths, for example 2, 5, or 2, 5. If it is optional to have an extension, do not set this hint. If this is set, and a UPC or EAN barcode is found but an extension is not, then no result will be returned at all.
final
allowedLengths List<int>?
Allowed lengths of encoded data -- reject anything else. Maps to an List<int>.
final
alsoInverted bool
If true, also tries to decode as inverted image. All configured decoders are simply called a second time with an inverted image. Doesn't matter what it maps to; use booltrue.
final
assumeCode39CheckDigit bool
Assume Code 39 codes employ a check digit. Doesn't matter what it maps to; use booltrue.
final
assumeGs1 bool
Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; use booltrue.
final
characterSet String?
Specifies what character encoding to use when decoding, where applicable (type String)
final
hashCode int
The hash code for this object.
no setterinherited
needResultPointCallback ResultPointCallback?
The caller needs to be notified via callback when a possible ResultPoint is found. Maps to a ResultPointCallback.
final
other Object?
Unspecified, application-specific hint. Maps to an unspecified Object.
final
possibleFormats List<BarcodeFormat>?
Image is known to be of one of a few possible formats. Maps to a List of BarcodeFormats.
final
pureBarcode bool
Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; use booltrue.
final
returnCodabarStartEnd bool
If true, return the start and end digits in a Codabar barcode instead of stripping them. They are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them to not be. Doesn't matter what it maps to; use booltrue.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tryHarder bool
Spend more time to try to find a barcode; optimize for accuracy, not speed. Doesn't matter what it maps to; use booltrue.
final

Methods

copyWith({bool? other, bool? pureBarcode, List<BarcodeFormat>? possibleFormats, bool? tryHarder, String? characterSet, List<int>? allowedLengths, bool? assumeCode39CheckDigit, bool? assumeGs1, bool? returnCodabarStartEnd, ResultPointCallback? needResultPointCallback, List<int>? allowedEanExtensions, bool? alsoInverted}) DecodeHint
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withoutCallback() DecodeHint

Operators

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