Add an assist/refactor to remove a function tear-off #52863
Labels
analyzer-assist
Issues with analysis server assists
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Hello!
One of Dart's feature is the ability to pass a function identifier to another function as argument, such as:
list.map(callback);
But it's not uncommon that after some changes, our
callback
now expects two arguments. Meaning we have to remove the tear-off to write instead:Similar to how we have a "replace function literal with tear-off" refactor, it would be nice to have a "replace tear-off with function literal".
This would enable quickly doing a back-and-forth between both options depending on how the code evolves
The text was updated successfully, but these errors were encountered: