skip to Main Content

In VS Code on a Mac with Flutter extensions installed, if you hit Cmd + . then you will see this popup to wrap a widget:

enter image description here

Is there a way to customize one of those options? I would like to be able to wrap a widget inside GetX’s Obx like this:

Obx(()=> 
  WIDGET
)

Being able to do this would save me a lot of keystrokes. 😅 Thanks!

3

Answers


  1. I didn’t find a way to customise it but I use a snippet expander to accomplish the same thing. I use Atext on a Mac so ;obx would expand to Obx(()=>)

    Login or Signup to reply.
  2. You can use GetX Snippets extension in VS code.

    Login or Signup to reply.
  3. You can use the Getx Snippets extension/plugin for both VScode and IntelliJ :

    Getx Snippets extension – VScode

    Getx Snippets plugin – IntelliJ

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search