Gs1Content class final
GS1 data: Application Identifiers and their values.
The data is split with the Application Identifier table and rules zxing-cpp uses for the parentheses of the human readable Barcode.text. An identifier that occurs twice keeps its last value.
- Inheritance
-
- Object
- BarcodeContent
- Gs1Content
Constructors
-
Gs1Content(Map<
String, String> elements) -
Creates GS1 content.
const
Properties
- batch → String?
-
The batch or lot number (AI 10), if present.
no setter
- bestBeforeDate → DateTime?
-
The best before date (AI 15), if present and valid.
no setter
- count → int?
-
How many trade items a logistic unit holds (AI 37), if present.
no setter
-
elements
→ Map<
String, String> -
Values by Application Identifier, in barcode order:
{'01': '09501101530003', '17': '250101', '10': 'ABC123'}.final - expiryDate → DateTime?
-
The expiry date (AI 17), if present and valid; a day of
00is the last day of the month.no setter - gtin → String?
-
GTIN (AI 01), if present.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serial → String?
-
The serial number (AI 21), if present.
no setter
- sscc → String?
-
The Serial Shipping Container Code (AI 00) of a logistic unit, such
as a pallet, if present.
no setter
- uri → Uri?
-
A link that opens this content in the app made for it, for
launchUrlof package:url_launcher;nullwhen there is none.no setterinherited
Methods
-
isExpired(
[DateTime? now]) → bool -
Whether the expiryDate has passed: the item may be used through
that day.
falsewithout an expiry date.nowdefaults to the current time. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toPayload(
) → String -
The elements with their identifiers in parentheses,
(01)09501101530003(17)250101, the form GS1 encoding takes (BarcodeWriter(…, gs1: true), also inBarcodeView, orwriter.encodeContent(content), which sets it).override -
toString(
) → String -
A string representation of this object.
override
-
validate(
) → List< ContentIssue> -
The problems that keep toPayload from building this value, such as
an empty network name or a latitude out of range. Empty when the value
can be built. For forms: show each ContentIssue.message next to its
ContentIssue.field.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override