Skip to content

AppLocalizations class from flutter_gen does not show in completion/have import fix #3948

@TiffApps

Description

@TiffApps

Describe the bug
When using flutter_localizations, the extension doesn't lint/track AppLocalizations nor its import 'package:flutter_gen/gen_l10n/app_localizations.dart' automatically.

To Reproduce
Steps to reproduce the behavior:

  1. Install and setup flutter_localizations
  2. Go in any dart file and try to type AppLocalizations: no Quick Fix available, and we have to import the package manually.

Expected behavior
It should suggest import 'package:flutter_gen/gen_l10n/app_localizations.dart' in the Quick Fixes dropdown list.

Screenshots
image

Please complete the following information:

  • Operating System and version: Windows 10.0.19044.1645
  • VS Code version: 1.66.2
  • Dart extension version: 3.40.0
  • Dart/Flutter SDK version: Channel stable, 2.10.4
  • Target device (if the issue relates to Flutter debugging): None

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in dart / flutterin flutterRelates to running Flutter appsin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions