How to prevent deprecated flutter widgets suggestions in vs code

0 votes

I want to disable suggestions for widgets that are marked as deprecated by flutter. I've turned off he show deprecated suggestions in vs code but doesn't seem to work. It would be helpful to narrow down the suggestions to one's that are going to stay.

Apr 6, 2023 in Flutter by Ashwini
• 5,430 points
581 views

1 answer to this question.

0 votes

To prevent deprecated Flutter widgets suggestions in VS Code, you can use the Dart Analysis settings to exclude deprecated elements.

  1. Open the command palette in VS Code by pressing "Ctrl + Shift + P" (Windows, Linux) or "Cmd + Shift + P" (macOS).
  2. Type "Dart: Open Settings (JSON)" and select it from the list of options.
  3. In the "settings.json" file that opens up, add the following line:
    "dart.analysisExcludedFolders": ["**/deprecated/"],
    This line will exclude any files or folders with "deprecated" in their name from analysis.
  4. Save the changes to the "settings.json" file.

After applying this setting, VS Code should no longer suggest deprecated Flutter widgets in your code. However, keep in mind that this may also exclude other elements that you may want to use. Therefore, you can modify the above line to exclude specific deprecated elements that you want to avoid.

To know more about Flutter, join our Flutter Certification today.

answered Apr 6, 2023 by vinayak

Related Questions In Flutter

0 votes
1 answer

How to change Android minSdkVersion in Flutter Project?

Yes, you can change the minSdkVersion in ...READ MORE

answered Mar 21, 2023 in Flutter by Tej
7,252 views
0 votes
1 answer

How to implement drop down list in flutter?

You're close! The error you're getting is ...READ MORE

answered Mar 26, 2023 in Flutter by vishalini
2,480 views
0 votes
2 answers

How to create a circle icon button in Flutter?

To create something similar to a FloatingActionButton, ...READ MORE

answered Aug 23, 2023 in Flutter by anonymous
• 140 points
9,829 views
0 votes
1 answer

How to dynamically resize text in Flutter?

You can use the FittedBox widget to ...READ MORE

answered Mar 27, 2023 in Flutter by Tej
7,219 views
0 votes
1 answer
0 votes
1 answer

Flutter App launch doesn't work in VS Code

It seems that the error message is ...READ MORE

answered Apr 3, 2023 in Flutter by Tej
5,175 views
0 votes
1 answer

Linter pylint is not installed

Open a terminal (ctrl+~) Run the command pip ...READ MORE

answered Apr 15, 2019 in Python by SDeb
• 13,300 points
1,845 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,230 points
903 views
0 votes
1 answer
0 votes
1 answer

How to get barcode from PDA scanner device in flutter

It's possible that the data sent by ...READ MORE

answered Apr 3, 2023 in Flutter by seena
1,135 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP