CheckDigit class abstract final

GS1 check digit helpers for EAN-13, EAN-8, UPC-A, UPC-E, GTIN-14 and SSCC.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Methods

compute(String payload) → int
The GS1 mod-10 check digit for payload (the digits without the check digit).
expandUpcE(String upcE) → String?
Expands an 8-digit UPC-E code (number system, six digits, check digit) to the 12-digit UPC-A code it stands for.
isValidGtin(String code) → bool
Whether code is a GTIN-8, GTIN-12, GTIN-13 or GTIN-14 with a correct check digit.
isValidMod10(String code) → bool
Whether the last digit of code is its correct GS1 mod-10 check digit.
isValidUpcE(String upcE) → bool
Whether upcE is an 8-digit UPC-E code whose check digit is correct.
validate(String value, ScanSymbology symbology) → bool?
Checks value as a code of type symbology.
validateWithPolicy(String value, ScanSymbology symbology, CheckDigitPolicy policy) → bool?
Applies policy to value; null means "not checked".