Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createGroupRoom with specific metadata #120

Open
superaldo opened this issue Aug 23, 2023 · 1 comment
Open

createGroupRoom with specific metadata #120

superaldo opened this issue Aug 23, 2023 · 1 comment
Labels

Comments

@superaldo
Copy link

superaldo commented Aug 23, 2023

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
@demchenkoalex
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants