numSuffix property
String
get
numSuffix
Implementation
String get numSuffix {
final number = this;
if (number >= 11 && number <= 13) {
return 'th';
}
switch (number % 10) {
case 1:
return 'st';
case 2:
return 'nd';
case 3:
return 'rd';
default:
return 'th';
}
}