-
Notifications
You must be signed in to change notification settings - Fork 340
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 enhancementrelies 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
I don't know if this is VSCode feature request or specifically for dart/flutter, but is it possible to move a widget class (or any other class) to a new file? If I remember correctly Visual Studio have this refactoring option.
Say I have this my_widget.dart file.
class MyWidget extends StatelessWidget {
const MyWidget({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: child,
);
}
}
class MyOtherWidget extends StatelessWidget {
const MyOtherWidget({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: child,
);
}
}
I want to move MyOtherWidget to my_other_widget.dart (automatically created) and automatically import that file if my_widget.dart contains MyOtherWidget references. Sorry if this is a duplicate.
Thank you.
tomgilder, Jonas-Sander, jlepocher, HerrNiklasRaab, Numoy and 151 moretieorange, Jarkynbekbat, dhxyz, rienkkk, roadroot and 2 moreMagenda, longvulam, cgat, cnsumner, martipello and 14 morenasirjd, mika76, tieorange, Jarkynbekbat, roadroot and 1 morenasirjd, mika76, tieorange, Jarkynbekbat, lsaudon and 2 more
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 enhancementrelies 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