0

Recently the auto import feature for packages and widgets stopped from working, How can I solve it and back it to work? Here an example for import the material flutter package.. in the past when I used to click on fast solve button it was give me an option to import it automatically .Flutter auto import does not work

3
  • Did you try: flutter pub get and then restarting your window? Commented Mar 21, 2021 at 21:18
  • 1
    Try this stackoverflow.com/a/67092300/15166812 Commented Apr 14, 2021 at 13:09
  • Thanks @Nitesh putting the dependencies under dependencies: solved my problem Commented Jul 18, 2021 at 6:32

2 Answers 2

0

import material.dart to get the rest of the widget working.

Sign up to request clarification or add additional context in comments.

1 Comment

My problem isn't here, I know that but the auto import in general does not work
0

I've had to deal with that for a month or so, and I only managed to solve it a few days ago. If your problem is anything like mine then it's probably due to one of your settings.

The brute force solution I found is to completely clear your settings.json file and set your preferences again one by one. Only add those you actually need. I had a lot of them which didn't change much or anything I could notice.

You could also comment out each line one by one to try to find out what exact setting is causing the issue but that's more tedious than doing it all over again.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.