isMale method
Check if a Swedish personal identity number is for a male.
Returns true
if it's a male.
Implementation
bool isMale() {
var sexDigit = num.substring(num.length - 1);
return int.parse(sexDigit) % 2 == 1;
}
Check if a Swedish personal identity number is for a male.
Returns true
if it's a male.
bool isMale() {
var sexDigit = num.substring(num.length - 1);
return int.parse(sexDigit) % 2 == 1;
}