persian_input 0.2.3 copy "persian_input: ^0.2.3" to clipboard
persian_input: ^0.2.3 copied to clipboard

Flutter Persian/Arabic number formatter

The example app running in Android

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'
   ),
 )
2
likes
130
points
30
downloads

Publisher

verified publisheratyscode.ir

Weekly Downloads

Flutter Persian/Arabic number formatter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on persian_input