Home > Software design >  How to remove warning text beside my code in Flutter's Visual Studio Code
How to remove warning text beside my code in Flutter's Visual Studio Code

Time:05-04

I am a new Flutter learner, and this is kinda annoy me, I think the "Problems" tab under is fully understand, I don't want to see warning next to my code. Is there a way I can disable or hide it? Thank you.

enter image description here

CodePudding user response:

Hey, In visual studio code you can do minute changes.

Step1: Press ctrl shift p , a command pallet will open enter image description here

Step2: Type settings.json and click on Open Settings (JSON) a file will open enter image description here

step3: Add this lines in that

"editor.codeActionsOnSave": {
        "source.fixAll": true
}

After this whenever you save const will be added automatically. Note: Sometimes you might get error because after saving some widgets are prefixed with const but, sometimes when your values in widget get dynamic, there will be a error, so be careful.

  • Related