You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Customize position of the constructor when creating constructor for the final fields #2937
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.
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.
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).
Activity
[analyzer] Check sort_constructors_first lint when inserting construc…
DanTup commentedon May 24, 2021
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).