Last updated:
0 purchases
persian input
Persian/Arabic number input formatter #
If you use the digitsOnly formatter option on a TextField in Flutter, it only works with English digits, and you can't use Persian/Arabic numbers.
However, if you don't use any input formatter, then you can't convert Persian/Arabic digits to an integer
How to use #
Add this line to your file
package:persian_input/validator/number_validator.dart
copied to clipboard
Now simply add PersianNumberValidator class in inputFormatters list.
TextField(
inputFormatters:[
PersianNumberValidator()
],
decoration: const InputDecoration(
hintText: 'With persian formatter'
),
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.