-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancement
Milestone
Description
Describe the bug
If you have a private StatelessWidget that you'd like to turn into a StatefulWidget, when you using the VS Code helper to do so your new State class will be prefixed with an extra underscore:
For example, if your class name was _MyCustomWidget, when using Convert to StatefulWidget the new state generated will be__MyCustomWidgetState (notice the two underscores at the beginning)
To Reproduce
- Create a private
StatelessWidget - Click on
Convert to StatefulWidgetand see the new state being prefixed by 2 underscores.

Expected behavior
The new state generated only has one underscore.
Versions (please complete the following information):
- VS Code version: 1.56.2
- Dart extension version: 3.22.0
- Dart/Flutter SDK version: Flutter (Channel beta, 2.2.0-10.3.pre, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
Metadata
Metadata
Assignees
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancement