Utility method for converting expressions into case patterns #59595
Labels
analyzer-api
Issues that impact the public API of the analyzer package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
Inside
analyais_server_plugin\lib\edit\correction_utils.dart
we haveCorrectionUtils.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.
The text was updated successfully, but these errors were encountered: