You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that this library does not have any support for locale aware parsing, as DoubleValueAccessor is using double.tryParse that does not take any locale into account.
What is the intended way to deal with different locales and floating point formats an this library?
Shouldn't this library already take care of this an provide proper parsing for any locals? (It already has a dependency towards intl)
Environment
Package version: 17.0.1
Describe your question
Depending on the local/language setting of an app, users expect to input floating point number with varying decimal separators. (E.g. see https://en.wikipedia.org/wiki/Decimal_separator#Conventions_worldwide).
I found that this library does not have any support for locale aware parsing, as DoubleValueAccessor is using
double.tryParse
that does not take any locale into account.intl
)We came up with a custom value accessor:
that allows specifying a format like
NumberFormatDoubleValueAccessor(NumberFormat.decimalPattern('de'))
.The text was updated successfully, but these errors were encountered: