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

Help: How can I disable rounding? #883

Open
SamMotta opened this issue Aug 29, 2024 · 1 comment
Open

Help: How can I disable rounding? #883

SamMotta opened this issue Aug 29, 2024 · 1 comment

Comments

@SamMotta
Copy link

I need to ignore de fourth decimal place:

It formats: 0.0325 => 0.033
But I need to format to: 0.032

final numberFormat = NumberFormat('0.000', 'pt_BR');
return numberFormat.format(this);
@mosuem
Copy link
Member

mosuem commented Aug 30, 2024

I would recommend using the floor method before passing the number to the number formatter, as package:intl does not offer rounding options.

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

No branches or pull requests

2 participants