persian_number_utility
1.1.6, released 2 years ago by an unverified publisher
Convert numbers to Persian/English letters, format Jalali dates, and validate Iranian IDs.
What it does
Provides extension methods for strings and dates to convert numbers to Persian or English words, format and separate digits, convert Gregorian dates to Jalali/Shamsi dates, and validate Iranian national codes, mobile numbers, postal codes, and bank cards.
AI-written summary of version 1.1.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display Persian (Jalali) dates and relative time in your Flutter app
- You need to format numbers into words or currency (Toman/Rial) for Persian users
- You need to validate Iranian national codes, postal codes, mobile numbers, or bank cards
Skip it when
- Your application does not target Persian-speaking users or require Jalali date conversion
- You need internationalization for non-Persian locales
Strengths
- Rich set of string extension methods specifically tailored for Persian and Iranian formats
- Supports Jalali date conversion and relative time formatting
- Includes various validators for Iranian specific data like national codes and IBANs
Weaknesses
- Strictly focused on Persian language and Iranian localized formats
- Limited documentation outside of the README
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Simply add the dependency to pubspec.yaml and import the package.
import 'package:persian_number_utility/persian_number_utility.dart';
Text("100092".toWord());
Text(DateTime.now().toPersianDate());
Text('2220042944'.isValidIranianNationalCode().toString());Alternatives
Packages that do the same job and could replace persian_number_utility.
- shamsi_date
A Dart and Flutter package for using, converting, and formatting Jalali and Gregorian calendars.
63Compare - number_to_words
Convert numbers into words by locale ID supporting English and Malayalam.
48Compare - number_to_words_english
Convert numbers to words, ordinals, and currencies in 12 languages.
49Compare