loadMoreData method

  1. @override
void loadMoreData(
  1. List<MessageModel> messageList
)
override

Implementation

@override
void loadMoreData(List<MessageModel> messageList) {
  messageList = List.from(messageList.reversed);
  List<MessageModel> tempList = [...initialMessageList, ...messageList];
  for (var message in tempList.reversed) {
    inflateMessage(message);
  }
  initialMessageList.clear();
  initialMessageList.addAll(tempList);
  if (messageStreamController.isClosed) return;
  messageStreamController.sink.add(initialMessageList);
}