Can someone tell me how to disable the warning underlines in my code? I have posted the picture below. The blue wiggly signs are a pain while writing more codes. I tried to disable the SDK Formatter from the extension settings but it didn't work for me.

CodePudding user response:
You are missing const keyword there.
void main() => runApp(
const MaterialApp(
home: Text("hello"),
),
);
Linting code is good practice. But it's totally up to you to lint the code. If you want to disable linting, remove this line in pubspec.yaml,
flutter_lints: ^1.0.0 // remove this line
CodePudding user response:
Try to Write this code
void main() {
runApp(MaterialApp(
home: Text('hello'),
));
}
CodePudding user response:
The underlines note problems regarding your code.
- red squiggles are representing syntax errors
- blue squiggles are representing compiler errors
- green squiggles are representing warnings
Now, your line is blue, so it is safe to assume that you do not want to see the location of compiler errors being underlined while you write code, at least in Visual Studio 2015, according to this source you can do something like this:
Tools -> Options -> Text Editor -> -> Advanced -> IntelliSense -> Disable Squiggles
