caseyryan/flutter_multi_formatter

CurrencyInputFormatter - onValueChange reports incorrect value when cursor is at the end

Closed this issue · 1 comments

I am using CurrencyInputFormatter in the following way:

CurrencyInputFormatter(
  // ...
  mantissaLength: 2,
  onValueChange: (value) => print("NEW VALUE $value"),
)

When the cursor is at the end of the input (example here:)
image

and I type something (for example 5), the value in the input does not change (which is correct), but I get this message:

NEW VALUE 123456.255

which is clearly incorrect and inconsistent with the content of the input.

Can you please fix this issue?

It's a bug of Flutter, I can't do anything with this. Sorry.