add_comma 0.2.0 add_comma: ^0.2.0 copied to clipboard
Flutter and Dart package for adding a separater in a number, For both International and Indian formarts.
add_comma #
Flutter and Dart package for adding a separater in any number.
It currently supports Intenational and Indian Number system.
In international System
e.g value = 1000
returns 1,000
In Indian system,
e.g value = 1000000
returns 10,00,000
Usage #
import the package
import 'package:add_comma/add_comma.dart';
Use the addCommas Function for the International Number system
final putComma = addCommas();
For Indian number system, use:
final putCommaIndian = addCommasIndian();
print( putComma(1000) );
print( putComma(1000000) );
print( putCommaIndian(1000000) );
Output #
1,000
1,000,000
10,00,000
You can also specify your own separator
final putComma = addCommas(separator: '_',);
print( putComma(1000) );
Output_ #
1_000
Made and Maintained by
Tonny Bawembye #
tonnybaw75@gmail.com
+256 781521534
+256 704436434