skip to Main Content

I know copying and pasting the code is commonly used, but sometimes writing from scratch offers more granular control over the program you’re trying to develop.

The problem is when writing a built-in widget that has properties (e.g., Column's mainAxisSize: MainAxisSize.min) to apply layout setup to a specific widget.

It usually takes around 10-30 seconds (or, if I remember clearly, it takes longer sometimes) to validate the code on a random sequence of events (i.e., the first time or after a long period when I decided to continue the program).

It stuck here:

img

The worst scenario is, sometimes, from the Column's mainAxisSize: MainAxisSize.min widget properties. It prevents applying code changes (i.e., hot reload) to the currently running app, even if the code changes were made correctly.

Can someone explain what is going on here? Does anybody encounter the same behavior of Visual Studio Code while developing a Flutter project?

I was hoping that I could make it in an instant hot reload after code changes (i.e., after CTRL + S [save to trigger hot reload]) while maintaining code suggestions and suppressing unpleasant behavior like this.

2

Answers


  1. Chosen as BEST ANSWER

    With the help of shantharuban's answer,

    I've ended up configuring the settings of Visual Studio Code this way:

    img

    The other portion settings have an original value of on and changed into off, but I found it more helpful to see the complete widget property name while typing the characters related to that property (where I can press the tab key to trigger auto-complete, which can also speed up the development process), so I've decided to change from off to inline as shown on the provided image above.

    It behaves like this way:

    img

    Let's see how it behaves compared to off and on Quick Suggestions other value's settings.


  2. Workspace setting was created with just this line in it:

    "editor.quickSuggestions": false,
    

    Which obviously caused quick suggestions to stop showing. This was not in the general VS code settings so remove it.

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