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



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


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

Answered By – Shaan Mephobic

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More