A Dart package for formatting numbers in the Indian numeral system and converting numbers to words, with support for South Asian currency symbols.
- Indian Grouping Format: Format numbers with Indian grouping (e.g.,
12,34,56,789
). - Number to Words Conversion: Convert numbers to words in the Indian numeral system (e.g.,
Twelve Crore Thirty Four Lakh Fifty Six Thousand Seven Hundred Eighty Nine
). - Currency Symbol Support:
- India: ₹
- Bangladesh: ৳
- Pakistan: ₨
- Nepal: रु
- Bhutan: Nu
- Afghanistan: ؋
- Maldives: Rf
- Sri Lanka: Rs
Add the following to your pubspec.yaml
file:
dependencies:
indian_numeral_converter: ^1.0.0
Then run:
flutter pub get
import 'package:indian_numeral_converter/indian_numeral_converter.dart';
void main() {
print(IndianNumeralConverter.formatToIndian(123456789));
// Output: 12,34,56,789
}
void main() {
print(IndianNumeralConverter.formatToIndian(1000000, currency: "Nepal"));
// Output: रु 10,00,000
}
void main() {
print(IndianNumeralConverter.formatToIndianWords(123456789, currency: "Sri Lanka"));
// Output: Rs Twelve Crore Thirty Four Lakh Fifty Six Thousand Seven Hundred Eighty Nine
}
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to submit a pull request or open an issue.
This project is licensed under the MIT License. See the LICENSE file for details.
Agniva Maiti
GitHub: AgnivaMaiti