getMessages method

  1. @override
List<ChatwootMessage> getMessages()
override

Implementation

@override
List<ChatwootMessage> getMessages() {
  List<ChatwootMessage> sortedMessages =
      _messages.values.toList(growable: false);
  sortedMessages.sort((a, b) {
    return a.createdAt.compareTo(b.createdAt);
  });
  return sortedMessages;
}