Closed
Description
It would be great if the Dart tooling supported a quick fix that converted functions between positional and named argument types (in either direction).
If the function already has a mix of parameter types, then only the applicable parameters would be converted.
Before:
Widget _endorsementWidget(
Profile profile,
EndorsementView endorsementView,
bool isOwnProfile,
bool hideIfApproved,
) { ... }
After:
Widget _endorsementWidget({
required Profile profile,
required EndorsementView endorsementView,
required bool isOwnProfile,
required bool hideIfApproved,
}) { ... }
or vice versa.
All invocation site args should also be fixed to correspond to the change in the definition of the function parameters.
(Dart version 3.5.0-180.3.beta)