normalize method

String normalize(
  1. String data
)

Returns the barcode string with the correct checksum

Implementation

String normalize(String data) => checkLength(
    data.padRight(minLength, '0').substring(0, minLength), maxLength);