fetchHistoryMessages method

Future<CursorResult<Message>> fetchHistoryMessages({
  1. required String conversationId,
  2. ConversationType type = ConversationType.Chat,
  3. int pageSize = 20,
  4. SearchDirection direction = SearchDirection.Up,
  5. String startMsgId = '',
})

Implementation

Future<CursorResult<Message>> fetchHistoryMessages({
  required String conversationId,
  ConversationType type = ConversationType.Chat,
  int pageSize = 20,
  SearchDirection direction = SearchDirection.Up,
  String startMsgId = '',
}) {
  return checkResult(ChatSDKEvent.fetchHistoryMessages, () {
    // ignore: deprecated_member_use
    return Client.getInstance.chatManager.fetchHistoryMessages(
      conversationId: conversationId,
      type: type,
      startMsgId: startMsgId,
      pageSize: pageSize,
      direction: direction,
    );
  });
}