Skip to content

Super class code completion #3734

@cedvdb

Description

@cedvdb

Currently when extending a class it is very tedious to pass each parameters to the super constructor.

This feature dart-lang/language#1855 will resolve most of the verbosity, however code completion should go a step further and be able to generate a constructor with super parameters

class House {
  final int windows;
  House({required this.windows});
}

class TestHouse extends House {
   // proposed, compiles
   TestHouse({super.windows});
   // alternatively
   TestHouse({int windows}) : super(windows: windows);
   // currently, which does not compile
   TestHouse() : super()
}

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 enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions