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

i dont know where this error message is coming from #38

Open codeincraft opened 3 years ago

codeincraft commented 3 years ago

IMG-20210526-WA0037 IMG-20210526-WA0039 IMG-20210526-WA0041 Screenshot_20210526-011357

eatmyaspirin commented 3 years ago

from what I can see apparently the text widget you use in your "messagebubbles" isnt actually getting any data ie. the string variable is null from what I can see, you did final messageText = message.data['text']; final messageSender = message.data['sender']; using the .get method on the "message" object should fix it : final messageText = message.get('text'); final messageSender = message.get('sender');

alternatively final messageText = message['text']; final messageSender = message['sender'];

codeincraft commented 3 years ago

yeah, thanks to you all for your comments, actually I already fixed the problem. it was actually coming from my firebase set up. I was passing a null argument into my fire base