How to auto import FLUTTER packages Visual Studio Code ver: 1.51.1 Windows 10

1,943

First type the name of class you wish to import.

Since it has not already been imported, VSCode shows red underline below that identifier name. Make sure your cursor is pointed to that unrecognized identifier name and depending on your platform, press

ctrl + . or cmd + .

to see a list of available quick fixes.

Share:
1,943
IronWok
Author by

IronWok

Updated on November 27, 2022

Comments

  • IronWok
    IronWok over 1 year

    I watch youtube tutorials and when the presenter types part of a screen name the import is automatically created. In one video the presenter enters part of a screen name and a list appears with the required screen at the top. He presses tab and the import is generated. When I do it the list appears I press tab and nothing happens. I have checked for "auto import" in the extension marketplace but am unable to locate one for Dart. Every video I watch it works. It is such a silly little thing but it is driving me crazy, which is not good for my blood pressure. :) Somebody please help me because I have tried searching the net and youtube.

  • IronWok
    IronWok over 3 years
    I want to import "Firebase Auth"
  • IronWok
    IronWok over 3 years
    I type import 'firebase_auth' but no red line and ctrl+ just increases the type size. In the tutorial I am following on youtube as soon as he types import' he gets a red underline a list of packages appear and he just picks the one he wants. Please help this is driving me insane.
  • IronWok
    IronWok over 3 years
    I decided to reinstall Visual Studio Code even though I had the latest version and of course it started to work. Thank you for your help.