checkSumModulo10 method
Calculate the Checksum using a modulo 10
Implementation
@override
String checkSumModulo10(String data) {
var sum = 0;
var fak = data.length;
for (var c in data.codeUnits) {
if (fak % 2 == 0) {
sum += (c - 0x30) * 9;
} else {
sum += (c - 0x30) * 3;
}
fak--;
}
return String.fromCharCode((sum % 10) + 0x30);
}