Most of the blue lines indicate corrections or the proper way in which the code can be optimized.
In your case, the children of the widget indicates that it should be constant because you are not using any variables there.
Just use const keyword and the blue lines will disappear. However, if you are going to add some variables in your code later, an error will come because of that const keyword. Make sure to add const only where you are absolutely sure that the widget is going to be immutable.
Another fix can be hovering over the blue lines and ignoring them by commenting them out.
2
Answers
Most of the blue lines indicate corrections or the proper way in which the code can be optimized.
In your case, the
children
of the widget indicates that it should be constant because you are not using any variables there.Just use
const
keyword and the blue lines will disappear. However, if you are going to add some variables in your code later, an error will come because of thatconst
keyword. Make sure to addconst
only where you are absolutely sure that the widget is going to be immutable.Another fix can be hovering over the blue lines and ignoring them by commenting them out.
Your question already has answer in the below links.
Disable wavy underline in VS Code
flutter in vscode how to remove blue line