fetchMoreMessage method

  1. @override
Future<void> fetchMoreMessage(
  1. int pageSize,
  2. String chatId
)
override

Implementation

@override
Future<void> fetchMoreMessage(
  int pageSize,
  String chatId,
) async {
  var value = await chatOverviewService.getChatById(chatId);
  _cumulativeMessages.clear();
  if (value.messages != null) {
    _cumulativeMessages.addAll(value.messages!);
  }
  _controller.add(_cumulativeMessages);
  notifyListeners();
}