FlutterTip: Select quick actions in VSCode faster
If you are an avid keyboard user you may not enjoy having to reach out for your mouse every time you need to select a quick action, for example, to wrap one widget with another widget.
Although this is not specific to any programming language, it is specially true for Flutter because there are a lot of quick actions.
That's where the Keyboard QuickFix extension comes in.
It allows you to filter and select quick actions faster.
After installing the extension, we need to setup a new keyboard shortcut. So open the command pallette and search for
Preferences: Open Keyboard Shortcuts (JSON) then press
Then add this to the end of the file:
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
Now when you press
Ctrl + . (on a widget) you can type
www to select the Wrap with widget action.
Here is a table of filters to select some of the default quick actions.
|Wrap with Builder
|Wrap with Center
|Wrap with Column
|Wrap with Container
|Wrap with Padding
|Wrap with Row
|Wrap with SizedBox
|Wrap with StreamBuilder
|Wrap with widget
|Remove this widget
Thanks for reading!