Convert number & date to words in any language for Flutter/Dart, this package is inspired from laravel package riskihajar/terbilang
Number to words conversion support multi language.
id
| Bahasa Indonesiaen
| English- soon
dependencies:
terbilang: 1.0.5 #latest version
Feel free to submit pull requests for desired changes / features / bug fixes... It makes the maintenance of this code much easier as I no longer use Flutter frequently.
Terbilang supports for number, date (coming soon), and romans (coming soon)
import 'package:terbilang/terbilang.dart';
...
Terbilang _terbilang = Terbilang(number: 10000); // u can use any parameter (string, int, double) numeric on costruct
//Terbilang _terbilang = Terbilang(number: "10000");
//Terbilang _terbilang = Terbilang(number: 10000.87);
print(_terbilang.result()); // sepuluh ribu
Terbilang _terbilang1 = Terbilang(number: 1290.56);
print(_terbilang1.result()); // seribu dua ratus sembilan puluh koma lima enam
if you set language to id
import 'package:terbilang/terbilang.dart';
...
Terbilang _terbilang = Terbilang(); // default language is id
print(_terbilang.make(number : 10000, prefix : "senilai", suffix : "rupiah")); //senilai sepuluh ribu rupiah
if you set language to en
import 'package:terbilang/terbilang.dart';
...
Terbilang _terbilang = Terbilang(lang : "en"); // default language is id
print(_terbilang.make(number : 6000, suffix : "dollars")); //six hundred dollars
coming soon
coming soon
coming soon
coming soon
note : i don't have write widget to use for flutter, but if u really need it, u can write and feel free to make pull request
//how to use on widget
... : Container(
child : Text(Terbilang(number: 10000.87).result())
);
//how to use on widget with latest build
... : Container(
child : Text(Terbilang().make(number: 10000.87))
);
another awesome feature