Skip to content

Autocomplete for overriding members does not appear in all lines within an extended Class #3784

@osaxma

Description

@osaxma

Describe the bug
Not sure if this is a bug or if it's based on the style guide of how members should be sorted.

class _SomeStatefulWidgetState extends State<SomeStatefulWidget> {
  
  // ❌ autocomplete for override does not work here
 
  String value1 = '';

  // ❌ autocomplete for override does not work here
  
  String get value2 => '';

  // ✅ autocomplete for override works here 

  void method() {}
  
  // ✅ autocomplete for override works here 


  @override
  Widget build(BuildContext context) {
    return Container();
  }

  // ✅  autocomplete for override works here

}

To Reproduce
The code sample above and the screen recording below should have reproduction steps.

Expected behavior
I expect autocomplete to work anywhere within the class for overriding members.

Screenshots

Screen.Recording.2022-01-15.at.9.51.48.PM.mov

Versions:

  • VS Code version: 1.63.2
  • Dart extension version: 3.32.0
  • Dart/Flutter SDK version:
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (4 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

Additional Context
This could be another issue but with dart code:

import 'package:analyzer/dart/ast/visitor.dart';

class SomeClass extends SimpleAstVisitor {
  // auto complete does not work here
}

Though it worked later when after adding the following import:

import 'package:analyzer/dart/ast/ast.dart';

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions