question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Completions for Flutter (and other) libraries are missing if packages were fetched after opening the project

See original GitHub issue

During a recent live stream, I noticed that I was having some performance issues (Opened a separate issue on this one). Due to an unrelated issue, I downgraded my flutter channel from dev to stable. After doing this, I noticed that any imported libraries were not receiving auto completion anymore. I went back up to dev after a day or two and I am still not receiving proper auto-completion for these imported libraries. Sometimes this even happens with Flutter libraries like Foundation and Cupertino.

I find that if I’ve already imported the library via pubspec and imported it into the file; I can close out of the editor and it will give me the expected auto-completion.

This is a bit of a strange issue in that it seems to be very selective. For instance, when I was working with the Android Alarm Manager library, typing in the object AndroidAlarmManager did not give me auto-completion, however I was able to get auto completion for the attached methods/named constructors. Even typing in the object name again did not yield auto-completion either which again was a bit strange. On the other hand, a library like the http library didn’t have this problem. I can provide a log if needed; tomorrow, I plan to sit down and do some heavy coding.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
tensor-programmingcommented, May 25, 2019

seems to be working on the dev branch with 1.6.3.

0reactions
DanTupcommented, May 22, 2019

Trying the fix yourself right now is slightly complicated because you have to download a nightly Dart SDK and paste it over the one inside your Flutter SDK (which isn’t really recommended because it could cause other issues). I did to it on Flutter master to verify the fix though, and it does work as expected 😃

Until the fix reaches whichever channel you’re on you can keep using those workarounds (disable, or reload), or you could switch to the master channel (which essentially is the same as "dart.autoImportCompletions": false since the version we require to enable it was slightly newer than current stable).

I think the SDK rolls into Flutter fairly frequently, so I expect the fix will make master within a few days, and probably dev within a week or two. Once it hits master it’ll be clear which version it’s in (so it’s easier to tell when it makes dev).

I’ll close this since it’s fixed, but feel free to ping if you have any questions (or open new issues if you have other problems). Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

flutter - Project files can't see library - Stack Overflow
So what I've done is downgrading Flutter version to 2.13 by switching to older git branch in my installation folder, adjusted package versions ......
Read more >
Using packages - Flutter documentation
Depend on it. Open the pubspec. · Import it. Add a corresponding import statement in the Dart code. · Stop and restart the...
Read more >
Firebase JavaScript SDK Release Notes - Google
Fixed a bug where error.email and other fields were not populated in the Google Sign-In error flow if the user had been disabled...
Read more >
Get Started with Flutter Authentication - Auth0
Learn how to add user authentication to Flutter apps using OAuth 2.0 ... You may have different options of open-source software libraries ......
Read more >
Integrate the Google Play Billing Library into your app
See additional resources for a complete list of sample apps and other resources that you can use while integrating. Life of a purchase....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found