I’m developing a chat application using Flutterflow and Firebase. In my Firestore database, I have a ‘chat’ collection and a ‘message’ sub-collection. Each message document in the sub-collection contains a ‘message_seen’ boolean field. I want to set this field to ‘true’ whenever a user opens the chat page, indicating that the message has been seen. However, I’m unsure how to reference the specific message document to update the ‘message_seen’ field.
Additionally, I’m wondering if this approach is the most efficient or if there’s a better way to track whether a message has been seen. For instance, should I consider using Firebase Analytics or another method? Any advice or examples would be greatly appreciated.