InvalidBarcodes class

Invalid barcode blacklist

cf. https://github.com/openfoodfacts/openfoodfacts-dart/issues/188 The barcode scanners will return invalid barcodes due to bright reflections, poor lighting, etc… While those barcodes are theoretically valid EAN-8 barcodes, they are not attributed. We are thus putting in place a server side blacklist of common invalid barcodes, so that the app doesn't return a prompt to add a blacklisted product, or return a result for an invalid product once someone has created it.

Constructors

InvalidBarcodes.base()
Lazy but 99.9% of the time good enough constructor
InvalidBarcodes.loadFromJSONString(String jsonString)
JSON load constructor; may throw an exception.

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

isBlacklisted(String barcode) bool
Checks if a barcode is blacklisted
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

getUrl() String
Where the JSON file can be found.