Skip to content

Feature request: Option to convert all constructor parameters to required named parameters #3454

Open
@ThinkDigitalSoftware

Description

@ThinkDigitalSoftware

If I have a widget like the following,

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

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?

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.
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions