Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Generated l10n file is missing 'intl' import with Flutter 2.2.0 #83102

@SebastianEngel

Description

@SebastianEngel

After upgrading my Flutter SDK to 2.2.0 the generated localization file is missing the 'intl' import which leads to the following error:

.dart_tool/flutter_gen/gen_l10n/translations_de.dart:54:11: Error: 'intl.DateFormat' can't be used as a type because 'intl' doesn't refer to an import prefix.
    final intl.DateFormat dateDateFormat = intl.DateFormat.yMMMM(localeName);
          ^^^^^^^^^^^^^^^

Before upgrading to 2.2.0 (was 2.0.6):
Bildschirmfoto 2021-05-21 um 16 25 00

After upgrading to 2.2.0:
Bildschirmfoto 2021-05-21 um 16 26 06

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.2.0, on macOS 11.3.1 20E241 darwin-arm, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.56.2)
[✓] Connected device (3 available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: internationalizationSupporting other languages or locales. (aka i18n)c: regressionIt was better in the past than it is nowfound in release: 2.2Found to occur in 2.2found in release: 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions