english_numerals 1.0.1 english_numerals: ^1.0.1 copied to clipboard
A package to convert numbers to and from their English written form, with null safety and no dependency on flutter.
example/english_numerals_example.dart
// ignore_for_file: avoid_print
import 'package:english_numerals/english_numerals.dart';
void main() {
final one = Cardinal(1);
print(one.enUk); // "one"
print(one.enUs); // "one"
print(one); // "one"
final other = Cardinal(999);
print(other.enUk); // "nine hundred and ninety-nine"
print(other.enUs); // "nine hundred ninety-nine"
print(other); // "nine hundred ninety-nine"
final uk = Cardinal('nine hundred and ninety-nine');
print(uk.toInt()); // "999"
final us = Cardinal('nine hundred ninety-nine');
print(us.toInt()); // "999"
}