Skip to content

Autocomplete doesn't work properly with enums when using named imports #4794

@osaxma

Description

@osaxma

Describe the bug

When using named imports, auto completing enum doesn't show the value but prompt to insert a switch condition as shown below:

To Reproduce

Screen Shot 2023-10-16 at 7 11 11 PM
import 'dart:ui' as ui;

void main() {
  final x = ui.BlendMod  // <~~ auto complete here
}

Expected behavior

I expect the enum values to be shown

Please complete the following information:
Extension version: v3.74.0
VS Code version: 1.83.1
Flutter 3.13.6 • channel stable •
Dart 3.1.3 • DevTools 2.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in dart / flutterin editorRelates to code editing or language featuresin 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