How to surround flutter widget in vscode

Place your cursor in the widget you want to edit and use CTRL + . shortcut to see the options. Use CMD + . for MacOS. That will do it.


Sure!

Vscode offer a few refactor options, including Wrap with Column:

enter image description here

Just right-click on a widget and press "Refactor".


⚠️ If wrap with Column is not shown on Right-click - refactor:

  • on Window : Ctrl + .
  • on MacOs : + .

Then Right-click > wrap with Column


Here is the reason why this happen: https://dartcode.org/docs/refactorings-and-code-fixes/ . Also documented there: you can now bind shortcuts to the refactor actions:

Ctrl+. in Code opens the “lightbulb” menu showing all code fixes/refactors. Code v1.20 gained the ability to keybind quickfixes. To do this you should edit your keybindings.json file and include the ID of the refactor as found below.