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
Now simply add PersianNumberValidator class in inputFormatters list.
TextField(
inputFormatters:[
PersianNumberValidator()
],
decoration: const InputDecoration(
hintText: 'With persian formatter'
),
)