The getter ‘email’ was called on null.
Receiver: null
Tried calling: email

Allaale
Oct 27, 2020

--

I’m trying to make a chat between two people using Flutter and Firebase but I’m facing an error when I connect into my app using Firebase’s signInWithEmailAndPassword, it tells me:

the getter email was called on null.

to remove this error first let me show you where is my problem happen

if you look closer at my code on onPressed button you will see the path firestore, my path is fine but the one who caused the error is loggedInUser.email, because he will take the users' email address in anonymously and it will become null if signing anonymously. so try (remove .email ) in loggedInUser.email and just write ( loggedInUser,) only

AbdiAziz Isse Ibrahim

Flutter Developer

--

--

Allaale
Allaale

Written by Allaale

Msc.in computer science and engineering, WordPress Developer, Flutter developer, Pythonist

Responses (1)