dartvisual-studio-code

Refactoring in VSCode with Dart not working


I just started working with flutter and I am unable to refactor dart/flutter in VSCode.

I am running VSCode on MacOSX and installed VSCode as per the flutter documentation, installed the dart and flutter plugins. flutter doctor shows no issues.

The app I am creating runs fine on simulator and devices.

When trying to rename a property, using the refactor shortcut, no option to rename is available. When trying to rename a class, I get 'No refactorings available'

I can't believe this kind of refactoring would not be available.

What am I missing in my setup? Any suggestions on what I can check, change in VSCode?


Solution

  • Highlight property or class name and click on Rename Symbol enter image description here