Chat save to firebase

I have searched community and google but not found helpful.
I am doing this to save to firebase-

I am sure that something is wrong.
What I am getting while compiling-
Chat view is showing first the list of users like XXXXXXXXXXXX,YYYYYYYYYYY,ZZZZZZZZZ at first.Then it is showing chats.
Can anyone tell me what’s is wrong?

You can try this.Works fiine for me…

3 2 1

1 Like

Thanks for your help.

Are you storing chat in TinyDB?
I do not want to do that.

See my screenshots above I have stored all chat in firebase.

There are two problems-

1.How to use tag for message?Something like numbers…

2.How to get messages in right order? I mean in the way they had been send…

Its easy with Android Studio, because in there we can get push id(uniqe id). but in kodular there is no such thing right now. you have to use trick for that.

Can you show an example?