/ SDKs / Flutter
SDKs
Chat SDKs Flutter v4
Chat SDKs Flutter
Chat SDKs
Flutter
Version 4

List all scheduled messages

Copy link

Create a ScheduledMessageListQuery instance to retrieve all scheduled messages matching the specifications set by ScheduledMessageListQueryParams. After a list of all scheduled messages is successfully retrieved, you can access the data of each scheduled message from the result list.

try {  
  final params = ScheduledMessageListQueryParams();
  final query = await ScheduledMessageListQuery(params: params)
  final scheduledMessages = query.next();
  // You can handle actions relevant to the scheduled message list of the channel.
} catch (e) {
  // Handle error.
}

ScheduledMessageListQueryParams

Copy link
Property nameTypeDescription

order

ScheduledMessageListQueryOrder?

Determines the order of the retrieved messages. Acceptable values are createdAt and scheduledAt. (Default: createdAt)

messageTypeFilter

MessageTypeFilter?

Specifies the message type to filter the messages with the corresponding type. Acceptable values are all, user, file, and admin. (Default: all)

reverse

bool?

Determines whether to sort the retrieved messages in reverse order. If false, the results are in ascending order. (Default: false)

channelUrl

String?

Specifies a target channel to query the scheduled messages from. If null, it retrieves scheduled messages from all channels. (Default: null)

scheduledStatus

List<ScheduledStatus>?

Specifies list of scheduled message status where scheduled messages with only given status are retrieved. (Default: null)

limit

int?

Specifies the number of results to return per call. Acceptable values are 1 to 100, inclusive. (Default: 20)