Saving multiple messages in Realtime database

Hi,

I am facing a challenge. I created this simple messenger and it successfully stores the last sent message in the DB, replacing the prior message. How can I store all messages in the DB? I wanted to use a list and somehow combine the value with the block (insert value to list) but I do not know how I could use it.

Many thanks for your help.

Lukas

2 Likes