onMessagesRead method

  1. @override
void onMessagesRead(
  1. List<Message> messages
)
override

Implementation

@override
void onMessagesRead(List<Message> messages) {
  List<MessageModel> list = msgModelList
      .where((element1) => messages
          .where((element2) => element1.message.msgId == element2.msgId)
          .isNotEmpty)
      .toList();
  if (list.isNotEmpty) {
    for (var element in list) {
      element.message.hasReadAck = true;
    }
    refresh();
  }
}