SimformSolutionsPvtLtd/flutter_chatview

Streaming Messages

Closed this issue · 2 comments

Not a bug but a question.

This is for a group chat.
I am streaming Messages from Firebase Firestone.

How do I update the existing message list, with newly added messages whilst I am inside the chat screen.

you can use ChatController for that and use the addMessage function to add the message to the chat.
ex.

  _chatController.addMessage(
    Message(
        message: 'test',
        createdAt: DateTime.now(),
        sentBy: '1'),
  );

Thank you.
I will give this a try