-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-assistIssues with analysis server assistsIssues with analysis server assiststype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Inside analyais_server_plugin\lib\edit\correction_utils.dart we have CorrectionUtils.invertCondition for doing what the name suggests. It takes an expression and returns another with the exact opposite result.
For #45831, I was thinking maybe we could have something similar for converting expressions with one constant side into case patterns.
Also one for converting back, from a case pattern into an expression. These could also be exposed as assists (all three of them) if we choose to.
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-assistIssues with analysis server assistsIssues with analysis server assiststype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug