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:
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
With the help of shantharuban's answer,
I've ended up configuring the settings of Visual Studio Code this way:
The
other
portion settings have an original value ofon
and changed intooff
, 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 fromoff
toinline
as shown on the provided image above.It behaves like this way:
Let's see how it behaves compared to
off
andon
Quick Suggestionsother
value's settings.Workspace setting was created with just this line in it:
Which obviously caused quick suggestions to stop showing. This was not in the general VS code settings so remove it.