english_numerals 1.0.1 copy "english_numerals: ^1.0.1" to clipboard
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"
}
2
likes
160
points
150
downloads

Publisher

verified publisherel-darto.net

Weekly Downloads

A package to convert numbers to and from their English written form, with null safety and no dependency on flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

meta

More

Packages that depend on english_numerals