![]() Return MessageBubble() // or this message is already seen by user and we return message bubble like usually do. It is not like email where in it is possible to mark emails as unread. Return YourMessageWidgetThatWasNotSeen() }) //FutureBuilder ends here. There is no way yet to mark the text messages as unread. Check that we need to mark message as readįuture: markAsRead(), // markAsRead is a Future function to change your FIELD value in firestore. Given that you store your fire id in myId variable we check if message is received and not sent.įinal bool toMe = message.recieverId = myId We check if message is new (dont know your entity so lets say it has boolean `read`, that false when new. Lets say you show messages with ListView.builder: return ListView.builder( Inside your chat app, when you load messages to user, lets say you already have loaded messages and have a List messages. If you are in a situation like, when you have to chat with someone you dont want to and theyre trying to talk to you, sometimes you just want to know what. () Īuthid = ? true : false īorderRadius.only(topRight: Radius.circular(70)),Ĭolor: Theme.of(context).backgroundColor, Here is the my send message data: sender_id:12233, I am confused how the second user will change the value of the "READ: TRUE" back if he checks the chat room, and if the second user is currently in the chat room he should still change the READ: true. on Android you can see messages from your blocked. So far I can create only Unread, which means when I send Message to firebase collection, I decleared my Discover videos related to how to mark text messages as unread samsung on TikTok. I am trying to create Read and Unread Message feature in my chat application. This stops a message getting marked as read in the first place, rather than marking it as unread after you have read it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |