loadLocalMessagesByTimestamp method

Future<List<Message>> loadLocalMessagesByTimestamp({
  1. required String conversationId,
  2. required ConversationType type,
  3. required int startTime,
  4. required int endTime,
  5. int count = 30,
})

Implementation

Future<List<Message>> loadLocalMessagesByTimestamp({
  required String conversationId,
  required ConversationType type,
  required int startTime,
  required int endTime,
  int count = 30,
}) {
  return checkResult(ChatSDKEvent.getMessages, () async {
    final conversation = await createConversation(
      conversationId: conversationId,
      type: type,
    );
    return conversation.loadMessagesFromTime(
      startTime: startTime,
      endTime: endTime,
      count: count,
    );
  });
}