last day (15 days later) » 

23:13
1
A: Receiving warning message for null operator

Gwhyyythe await _auth.createUserWithEmailAndPassword(email: email, password: password) will return an UserCredential object, which it will never be null, so making an if else condition over it doesn't do anything really since the newUser != null will always equals to true. the piece of code you wrote ...

oh ok thanks... side question by the way... has firebaseUser changed ?
also the new warning thrown is that the local variable 'newUser' isn't used
yes it's changed to User, check out that question stackoverflow.com/questions/63482162/…
if you will not use it just call the method directly, without saving the return in the newUser variable,
If you're willing to use it for future, if you wanna get the email..., then just ignore it right now, when you do use it in the future that warning will dissapear
call the method directly??? I don't follow please... could you illustrate please
wait I will add it in the answer
I updated the answer, check it and feel free to give any other questions
Yeah I have seen it Thank you
I am learning to use Firebase through a tutorial... called Flash chat
23:14
Hi
and I have noticed a lot has changed in the firebase code since 2018... the tutorial is outdated
void getCurrentUser() async {
try {
final user = await _auth.currentUser;
loggedInUser = user!;
print(loggedInUser.email);
} catch (e) {
print(e);
}
}
which documentation are you following with, can you give me a link to it ?
oh it is a video... I downloaded... but I can give you the link to the completed code... so you can review it
are you on discord ?
23:37
no, I don't use it
wiat
no no this repo was made 4 years ago
you should refer to the actual Firebase SDK for Flutter firebase.flutter.dev/docs/overview
ok
thanks
you're welcome

last day (15 days later) »