CurrencyInputFormatter doesn't allow to input mantissa after entering dots/commas
TimYusR opened this issue · 3 comments
Hi!
I have an issue with CurrencyInputFormatter.
I use ThousandSeparator.Comma
.
When I enter a dot or comma to start entering the mantissa part it does nothing, but it is supposed to change the position and jump after the dot/comma.
It works on the iOS simulator and Android emulator if dots are entered.
But doesn't work on real devices(videos attached). On iPhone 13 TextInputType.numberWithOptions(decimal: true)
opens the keyboard only with a comma, so it will be cool if the comma support will appear in the package.
iPhone 12 mini, iOS 15.6.1
https://drive.google.com/file/d/12d-pdf6jyGrO7AvpLiKKqsvFdFH-oQZa/view?usp=sharing
Samsung Galaxy S8, Android 9
https://drive.google.com/file/d/1O4nlT6ECYIGVW4naf7CZlwFk5jzLMiIf/view?usp=sharing
Hi!
Two questions
- What is the language locale on your device? It affects the input type
- Can you provide a complete code snippet that reproduces the bug?
Hi! Two questions
- What is the language locale on your device? It affects the input type
- Can you provide a complete code snippet that reproduces the bug?
i have this problem too.
1.locale : cambodia
2. in the TextFormField
inputFormatters: [
CurrencyInputFormatter(
thousandSeparator: ThousandSeparator.Comma,
mantissaLength: 2,
),
],
I checked it. This is not a bug. You can't enter a comma to switch to a mantissa part if you use comma as a thousand separator. The formatter cannot understand what you want. It's not listening to the keyboard events it just checks if a string contains mantissa separator or not. In this case, the mantissa separator is period, not comma so it won't switch to the fraction side. And it's not supposed to