terbilang 1.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • new59

Terbilang | Number To Words Conversion For Flutter | Dart #

Convert number & date to words in any language for Flutter/Dart, this package is inspired from laravel package riskihajar/terbilang

Getting Started #

Number to words conversion support multi language.

Supported Language #

  • id | Bahasa Indonesia
  • en | English
  • soon

Feature #

Add dependency #

dependencies:
  terbilang: 1.0.5  #latest version

Pull Request #

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

Prefix & Suffix

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

Number to Roman #

coming soon

Number Shorthand #

coming soon

DateTime #

coming soon

Period #

coming soon

How to use on flutter #

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))
 );

coming soon #

another awesome feature

[1.0.5] - Up release v1, 24-09-2019

  • add Base API and Example

[1.0.4] - Up release v1, 24-09-2019

  • refactor structure

[1.0.2] - Up release v1, 24-09-2019

  • support for multiple language (id, en)
  • support fractional number
  • add prefix and suffix
  • move from result to make

example/README.md

Example #

Terbilang on FLutter (locale : id) #

locale : id source code locale : id

Terbilang on FLutter (locale : en) #

locale : en source code locale : en

Getting Started #

locale : id #

locale : en #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  terbilang: ^1.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:terbilang/terbilang.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
18
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

We analyzed this package on Oct 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
Dev dependencies
flutter_test