gtin_toolkit library

Functions

classifyGTIN(String inputGTIN) → Map<String, dynamic>
Classify input GTIN and returns it
generateGTIN({dynamic 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 de lightweight (or fast) from this library 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.