Simple package to transform numbers into English numerals without flutter dependency and with null safety, as opposed to other obsolete packages.
Features
Only integer cardinals are currently available, in the non-inclusive range ]-10^66, 10^66[
Usage
It can be used to create a Cardinal
number from int
or BigInt
:
final other = Cardinal(999);
print(other.enUk); // "nine hundred and ninety-nine"
print(other.enUs); // "nine hundred ninety-nine"
print(other.toString()); // "nine hundred ninety-nine"
It can also be used the other way around to convert cardinal text to int and BigInt:
final uk = Cardinal("nine hundred and ninety-nine");
print(uk.toInt()); // "999"
final us = Cardinal("nine hundred ninety-nine");
print(us.toInt()); // "999"
Libraries
- english_numerals
- Library to implement English written numerals in pure dart with null safety