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

Retrieve the total number of scheduled messages

Copy link

Use the getTotalScheduledMessageCount() method to retrieve the total number of scheduled messages a user has. The properties of TotalScheduledMessageCountParams are optional to set as a filter. If not set, the number of all scheduled messages that a user has will be retrieved.

try {  
  // Retrieve the total number of scheduled messages.
  final params = TotalScheduledMessageCountParams()
  final totalCount = await SendbirdChat.getTotalScheduledMessageCount(params: params); 
} catch (e) {
  // Handle error.
}

TotalScheduledMessageCountParams

Copy link
Parameter nameTypeDescription

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)

messageTypeFilter

MessageTypeFilter?

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