gtin_toolkit library

Functions

classifyGTIN(String inputGTIN) → GTINType?
Classify input GTIN and returns it
generateGTIN({int gtinLength = 14}) String
Generate any type of gtin and adds check digit gtinLength is the desired size with check digit
isValidGTIN(List<int> inputGTIN) bool
This function are lightweight (or fast). It receives an Integer List, and compute all math necessary to validate GTIN. Use if your gtin are always in same format.
parseAndValidate(dynamic gtin) bool
This function parses String to List<Int> before call isValidGTIN() and then return if GTIN is valid. rembenber try {} catch (e) {} this function could also throw Exceptions.