I\'m making a flutter app for my college project, where I\'m adding a login and signup page and authenticating it via Firebase, and when I click login the debug console says
I had same error and changed code to:
FirebaseUser user = (await _firebaseAuth.signInWithEmailAndPassword(email: email, password: password)).user;
The app works as expected on a real device, without an error in the console, but Visual Studio Code shows red underline at the end below user and outputs an error:
The getter 'user' isn't defined for the class 'FirebaseUser'. Try importing the library that defines 'user', correcting the name to the name of an existing getter, or defining a getter or field named 'user'.
[Solution] Restart VS Code. VS Code uses the old library until restart.