-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow numeric value input for amount #411
fix: allow numeric value input for amount #411
Conversation
dhruvanbhalara
commented
Dec 10, 2023
•
edited
edited
- fixes: Make the area where we enter the amount as number only. #405
- fixes: transaction input not using the correct decimator #392
maxLength: 13, | ||
maxLines: 1, | ||
counterText: '', | ||
inputFormatters: [ | ||
FilteringTextInputFormatter.allow(RegExp(r"[0-9.]")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could lead to issues in other languages, dutch for example uses ,
as a decimal point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xunafay, I've covered this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone through all the country data in the project and I've found the following decimal & thousands separators: [ .,-']
I could confirm no missing ones with this regex: ".+_separator": "[^ '.,-]"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xunafay, Do you mean like this?
RegExp(r"[0-9'.,-]")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, except the space is missing, in case the user types 1 000
or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xunafay, I've updated regex, can you please review it?
Hi @h4h13, |
Not please 🥺 I'm working on new things so once it's stabilized then you can change pr destination |
Hi @dhruvanbhalara I have updated this widget as part of the iOS keyboard is not able to dismiss while done entering the amount. if it still needs to fix add your changes and change pr to dev2 |
Let me know once it's finished will merge it |
0ae2c85
to
591060c
Compare
Hi @h4h13, |
591060c
to
9519258
Compare
9519258
to
6cf299f
Compare