Dart-code: vs code refactoring not working properly

Created on 12 Jan 2021  路  5Comments  路  Source: Dart-Code/Dart-Code

Describe the bug
Flutter extract variable option is not showing and shows only extract method and widget option and by extracting method/widget it doesnot ask for name and give it default name of newmethod/newWidget

To Reproduce
Steps to reproduce the behavior:

  1. Install vscode
  2. Install plugins flutter and dart
  3. open any flutter project and try to extract variable or method/widget
  4. It will not ask for rename

Expected behavior
Previously it was showing option to extract variable and also will ask for name after extracting variable/widget/method name

ScreenShorts
Screenshot from 2021-01-12 17-27-53
Screenshot from 2021-01-12 17-28-22

Versions (please complete the following information):

  • VS Code version: 1.52.1
  • Dart extension version: 3.18.1
  • Dart/Flutter SDK version: 1.22.5
duplicate

All 5 comments

I have the same problem with the latest version.

I have the same problem with the latest version.

I switched to android studio on temporary basis. Its working fine there.

I have to disable the LSP feature and it works fine on vscode.

I have to disable the LSP feature and it works fine on vscode.

Thanks borther setting LSP to false solved the problem

Thanks for the report! Extract Variable isn't currently available in the LSP version. There's an open issue tracking this at https://github.com/Dart-Code/Dart-Code/issues/2951. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rgb1380 picture rgb1380  路  3Comments

jascodes picture jascodes  路  4Comments

FeimiSzy picture FeimiSzy  路  4Comments

Matt-Gleich picture Matt-Gleich  路  4Comments

agmcleod picture agmcleod  路  3Comments