Skip to content

Localization support on TextFormField #75

@KingRial

Description

@KingRial

It would be nice if the TextFormField could support the correct localization set on the APP.

For example, if the double value is 10.12:

  • on "it-IT" localization, the input should show the string "10,12" and accept the character "," as decimal separator
  • on "en-GB" localization, the input should show the string "10.12" and accept the character "." as decimal separator (Exactly how it's working right now)

Here a quick example to obtaine the correct decimal separator from current locale:

final locale = Localizations.localeOf(context).toString();
final format = NumberFormat.decimalPattern(locale);
final desiredCharacter = format.symbols.DECIMAL_SEP;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions