Skip to content

Do not set Intl.defaultLocale in generated output #84

@vainamov

Description

@vainamov

According to flutter/website#3013 it's no longer recommended to modify the Intl.defaultLocale field. This prevents issues that cause the language to change application-wide when using Localizations.override-widgets such as in flutter/flutter#40353.

Flutter Intl modifies the field in it's generated static Future<S> load(Locale locale) method. Afaik there is no way to customize this behaviour currently and obviously manually editing the generated file after each build is no long-term solution.

Please remove the aforementioned line from the output or add a new config option, so users can toggle the generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions