ProductContent class final
A retail product number from an EAN-13, EAN-8, UPC-A or UPC-E barcode: the GTIN, and the ISBN or ISSN when the number is a book or a periodical (prefixes 978/979 and 977).
Only from barcodes, since a number alone does not say it is a product: BarcodeContent.parseText never returns it. toPayload returns raw.
- Inheritance
-
- Object
- BarcodeContent
- ProductContent
Constructors
- ProductContent({required String gtin, required String number, required String raw, String? addOn})
-
Creates product content.
const
Properties
- addOn → String?
-
The EAN-2 or EAN-5 add-on (issue number, price), if read.
final
- gtin → String
-
The GTIN-14: always 14 digits, zeros in front, as in
Gs1Content.gtin and product databases. A UPC-E number is expanded
to its UPC-A first:
01234565is00012345000065.final - hashCode → int
-
The hash code for this object.
no setteroverride
- isbn10 → String?
-
The ISBN-10 of a book whose ISBN-13 starts with 978, or
null: what older catalogues list.no setter - isbn13 → String?
-
The ISBN-13 of a book (
978…,979…), ornull.no setter - issn → String?
-
The ISSN of a periodical (
977…), as1234-5679, ornull.no setter - number → String
-
The number as printed under the barcode: 13 digits for EAN-13, 12
for UPC-A, 8 for EAN-8 and UPC-E.
final
- raw → String
-
The text as read.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toPayload(
) → String -
raw, the text as read.
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