hundred method
String
hundred(
- dynamic number
)
Implementation
String hundred(number) {
var value = "";
while (number.toString().length != 3) {
number = "0" + number;
}
var first = getNth(number, 0, 0);
switch (int.parse(first)) {
case 0:
value = hundreds["0"] ?? '0';
break;
case 1:
value = hundreds["1"] ?? '1';
break;
case 2:
value = hundreds["2"] ?? '2';
break;
case 3:
value = hundreds["3"] ?? '3';
break;
case 4:
value = hundreds["4"] ?? '4';
break;
case 5:
value = hundreds["5"] ?? '5';
break;
case 6:
value = hundreds["6"] ?? '6';
break;
case 7:
value = hundreds["7"] ?? '7';
break;
case 8:
value = hundreds["8"] ?? '8';
break;
case 9:
value = hundreds["9"] ?? '9';
break;
}
value = "$value و${oneTen(int.parse(getNth(number, 1, 2)))}";
return value;
}