Skip to content

Go to references of Widget property only search in same file with Flutter 3.7+ #4535

Closed

Description

@quyenvsp

Describe the bug
On newer Flutter version 3.7+ Go to References of Widget property only find in same file.
Old version 3.3.2 working fine.
Go to References of function property work fine on both

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/noncheat/flutter_gotoreferences
  2. Using Flutter 3.3.2, right click required this.problemReferences, lib/test.dart:6 > Go to References
  3. Result will show main.dart and test.dart
  4. Using Flutter 3.10.0 repeat step 2
  5. Result only show test.dart

Expected behavior
Flutter 3.7+ when use Go to References of Widget property should find in all files.

Screenshots
Working - Go to References of Widget property in Flutter 3.3.2

Problem - Go to References of Widget property in Flutter 3.10.0

Working - Go to References of function property in Flutter 3.10.0

Please complete the following information:

  • Operating System and version: Windows 11
  • VS Code version: 1.78.1
  • Dart extension version: v3.62.0
  • Dart/Flutter SDK version: Dart 3.0.0 / Flutter 3.10.0

Activity

  1. added this to the v3.66.0 milestone on May 11, 2023
  2. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    on May 11, 2023
  3. DanTup commented on May 11, 2023

    @DanTup
    Member

    Thanks - I can repro this. I think it may be specific to using this. on the parameters. A smaller repro:

    class AAA {
      final String? aaa;
      const AAA({this.aaa}); // Find reference on aaa here doesn't find the below
    }
    
    const a = AAA(aaa: ''); // Go-to-Definition on aaa here works
  4. DanTup commented on May 11, 2023

    @DanTup
    Member

    This is fixed by dart-lang/sdk@2d43bc3.

    The change is in the Dart analysis server so it'll show up in a future SDK release (rather than a Dart-Code release).

  5. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in 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