flutter / flutter/flutter-intellij
Feature request: Option to convert all constructor parameters to required named parameters
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
If I have a widget like the following,
```dart
class MyWidget extends StatelessWidget {
final arg1, arg2, arg3; // I know this is cringy, it's just for the sake of example.
MyWidget(this.arg1, this.arg2, this.arg3); // same with this.
}
```
or
```dart
class MyWidget extends StatelessWidget {
final arg1, arg2, arg3; // I know this is cringy, it's just for the sake of example.
MyWidget({this.arg1, this.arg2, this.arg3}); // same with this.
}
```
can you provide an option to convert the parameters to required named parameters in one fell swoop?
```dart
class MyWidget extends StatelessWidget {
final arg1, arg2, arg3; // I know this is cringy, it's just for the sake of example.
MyWidget({@required this.arg1, @required this.arg2, @required this.arg3}); // same with this.
}
```
Contributor guide
Assessment
This issue has not been assessed yet.