indian_numeral_converter 1.0.0
indian_numeral_converter: ^1.0.0 copied to clipboard
A Dart package to format numbers in the Indian numeral system and convert numbers to words with South Asian currency support.
Indian Numeral Converter #
A Dart package for formatting numbers in the Indian numeral system and converting numbers to words, with support for South Asian currency symbols.
Features #
- 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
Installation #
Add the following to your pubspec.yaml file:
dependencies:
indian_numeral_converter: ^1.0.0
Then run:
flutter pub get
Usage #
Formatting Numbers #
import 'package:indian_numeral_converter/indian_numeral_converter.dart';
void main() {
print(IndianNumeralConverter.formatToIndian(123456789));
// Output: 12,34,56,789
}
Formatting with Currency Symbols #
void main() {
print(IndianNumeralConverter.formatToIndian(1000000, currency: "Nepal"));
// Output: रु 10,00,000
}
Converting Numbers to Words #
void main() {
print(IndianNumeralConverter.formatToIndianWords(123456789, currency: "Sri Lanka"));
// Output: Rs Twelve Crore Thirty Four Lakh Fifty Six Thousand Seven Hundred Eighty Nine
}
Contributing #
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to submit a pull request or open an issue.
License #
This project is licensed under the MIT License. See the LICENSE file for details.
Author #
Agniva Maiti
GitHub: AgnivaMaiti