-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Description
Describe the bug
"wrap with widget" wraps the entire switch expression instead of the current branch
To Reproduce
enum MyEnum {a, b}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return switch(get()) {
MyEnum.a => const Text('a'),
MyEnum.b => const Text('b'),
};
}
}
MyEnum get() {
// ...
}
Move your cursor to Text('a')
and do a "Wrap with widget..."
(or anything else)
Expected behavior
The new widget should be parent of the Text('a')
branch and not of the entire switch expression
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following information:
- Operating System and version: Fedora 38
- VS Code version: 1.82.2
- Dart extension version: 3.72.2
- Dart/Flutter SDK version: 3.1.2 / 3.13.5
- Target device (if the issue relates to Flutter debugging):
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available