flutter_firebase_chat_core
flutter_firebase_chat_core copied to clipboard
createGroupRoom with specific metadata
trafficstars
Hello 👋
Maybe it's a bug or I'm not doing something right. when I create a room with metadata it works fine the room is created and the data in the field "metadata" is complete in my "firestore", but when I try to access the data inside "metadata" it throws me null or empty. here is my code for create a room:
final room = await FirebaseChatCore.instance.createGroupRoom(
name: nameRoom,
users: otherUser,
metadata: {
'typeProcess': typeProcess,
'algo': algo,
'pen': pen,
'endProcess': false,
},
);
and when I try to access the data inside "metadata" in my chat screen, it throws null, empty or 0.
print(widget.room.metadata.length) //output 0
Hello!
Maybe
`print(widget.room.metadata.length) //output 0`
is a saved room instance that will not update? If the data is on Firestore, you should be able to easily read that, after it is fetched.