validator library

Functions

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.