How to disable blue warning underline sign in flutter/dart extension?

1,120

Solution 1

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

and finally delete the analysis_options.yaml file in your project directory

Solution 2

Try to Write this code

    void main() {
  runApp(MaterialApp(
    home: Text('hello'),
  ));
}

Solution 3

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

Share:
1,120
Admin
Author by

Admin

Updated on January 01, 2023

Comments

  • Admin
    Admin over 1 year

    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.

    The blue lines pictured above