language server: Option to auto-fill required param keyword for non-null arguments #48119
Labels
analyzer-quick-fix
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
Wanted to open an issue for discussing a potential flag to the language server / analysis server for automatically filling the
required
keyword when non-nullable arguments are specified.As far as I know, this would be the first semantic-source-altering feature for the analysis server. I don't know if there has been an explicit decision to never implement something of the sort.
Discussion of language-level solutions:
f({ int! param })
syntax alternative: Replace current "@required this.name" in the named parameters with "this.name!" language#1103 (comment)The auto-fill feature should be discussed first, but as an aside, I think an elegant approach to such a feature would be to have it be bi-directional, so that an editor could toggle between "final source" and "truncated/tersified source." I doubt that would make sense if this is the only syntax rewrite that ever gets implemented though.
The text was updated successfully, but these errors were encountered: