Skip to content
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

MoneyMask force 0,000 (three 0 on decimal) #62

Open
guihsdev opened this issue Nov 12, 2020 · 2 comments
Open

MoneyMask force 0,000 (three 0 on decimal) #62

guihsdev opened this issue Nov 12, 2020 · 2 comments

Comments

@guihsdev
Copy link

guihsdev commented Nov 12, 2020

image

I will follow the order of the print numbering.

  1. MoneyMaskTextController declaration, in BRL format without "R$".
  2. What I typed in the Field
  3. What is printing on onChange
  4. Result of conversion from BRL to Double (to make an operation in the API)
@guihsdev
Copy link
Author

For more examples:
image
image
After I hit 0 once
image

Nothing changes visually, but if I press "," or "." the value is entered, just is not displayed.
image

@WallysonRodrigues
Copy link

WallysonRodrigues commented Dec 3, 2020

To solve it in my case, I decided to use the controller.text instead of the value returned by the onChanged method.

onChanged: (value) {
          print (value);
          print (controller.text);
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants