londonappbrewery / flash-chat-flutter

Learn to Code While Building Apps - The Complete Flutter Development Bootcamp
https://www.appbrewery.co
195 stars 677 forks source link

Exception caught by gesture #23

Open subhangpati opened 4 years ago

subhangpati commented 4 years ago

The following NoSuchMethodError was thrown while handling a gesture: The getter 'email' was called on null. Receiver: null Tried calling: email // This is the message that I am getting Screenshot (83)

Need help to resolve this.

https://github.com/flutter/flutter/issues/62747 Here is the full code I posted on official flutter community

Nik8110 commented 4 years ago

FlatButton( onPressed: () { //Implement send functionality. _firestore.collection('message').add({ 'sender':_auth.currentUser.email, 'send': messages, }); },

simply put this