gtgalone / currency_text_input_formatter

Currency Text Input Formatter for Flutter.
https://pub.dev/packages/currency_text_input_formatter
MIT License
50 stars 28 forks source link

Working with decimal points is atypical #28

Closed 0xPixelfrost closed 2 years ago

0xPixelfrost commented 2 years ago

Hi,

i think the way how you work with decimal points in your library is a bit confusing and I try to explain this by a small sample:

How it is: Entered value for 100 + click on decimal separator + 99 results in: 10,000.99

How it should be: Entered value for 100 + click on decimal separator + 99 results in: 100.99

Your formatter seems always to add new values to the decimal points and shift the main number to the left instead. This behaviour is compared to normal calculators very atypical and hard to maintain is you want to correct a number input.

Tested on 2.1.5

gtgalone commented 2 years ago

@0xPixelfrost Thank you so much!

If you have any idea. Feel free to contribute.

john182 commented 2 years ago

locale BR not working, decimal Separator is space

image

image

gtgalone commented 2 years ago

@john182 Thank you for the issue.

I will check it this weekend.

gtgalone commented 2 years ago

@john182 Could you share your code?

for me it is working.

Screen Shot 2022-06-17 at 1 54 42 PM
gtgalone commented 2 years ago

@0xPixelfrost current version direction is only rtl. so cursor will change to right end.

I will add direction property ltr. it might be worked what you want.

han-tm commented 1 year ago

Someone solved this problem? I need the pennies to be entered last