Skip to content

Customize position of the constructor when creating constructor for the final fields #2937

Closed

Description

@orestesgaolin

Is your feature request related to a problem? Please describe.

Dart Code allows to create constructor for the final fields. It puts it by default below the fields.

CleanShot 2020-11-05 at 18 17 22

Describe the solution you'd like

I would like to be able to customize position of the constructor when it's generated. It could be either set by the analyzer lint rule sort_constructors_first or by a switch in extension settings.

Describe alternatives you've considered

Manually moving constructor to the top of the class.

Additional context

There's a popular lint rule sort_constructors_first that enforces ordering constructor at the top.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Nov 5, 2020
  2. added
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    in editorRelates to code editing or language features
    on Nov 9, 2020
  3. added this to the On Deck milestone on Nov 9, 2020
  4. modified the milestones: On Deck, v3.23.0 on May 24, 2021
  5. DanTup commented on May 24, 2021

    @DanTup
    Member

    Fixed by dart-lang/sdk@899654d. As it's in the language server, it'll show up in a future Dart/Flutter SDK release (not the VS Code extension release).

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 enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions