listMessages method

Future<List<DecodedMessage>> listMessages(
  1. Conversation conversation, {
  2. DateTime? start,
  3. DateTime? end,
  4. int? limit,
  5. SortDirection sort = xmtp.SortDirection.SORT_DIRECTION_DESCENDING,
})

This lists messages sent to the conversation.

For listing multiple conversations, see listBatchMessages.

If start or end are specified then this will only list messages sent at or after start and at or before end.

If limit is specified then results are pulled in pages of that size.

If sort is specified then that will control the sort order.

Implementation

Future<List<DecodedMessage>> listMessages(
  Conversation conversation, {
  DateTime? start,
  DateTime? end,
  int? limit,
  xmtp.SortDirection sort = xmtp.SortDirection.SORT_DIRECTION_DESCENDING,
}) =>
    _conversations.listMessages(
      [conversation],
      start: start,
      end: end,
      limit: limit,
      sort: sort,
    );