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

Update a scheduled message

Copy link

You can update a scheduled user message by passing ScheduledUserMessageUpdateParams as an argument to the updateScheduledUserMessage() method.

// Updates a scheduled user message.
final params = ScheduledUserMessageUpdateParams(message: 'UPDATE_MESSAGE');

try {
  final scheduledUserMessage = await groupChannel.updateScheduledUserMessage(
    params: params,
    scheduledMessageid: scheduledMessage.scheduledInfo!.scheduledMessageId,
  );
} catch (e) {
  // Handle error.
}

You can also update a scheduled file message to send at a later time by passing ScheduledFileMessageUpdateParams as an argument to the updateScheduledFileMessage() method.

// Updates a scheduled file message.
final params = ScheduledFileMessageUpdateParams(fileName: 'UPDATED_FILE_NAME');

try {
  final updateScheduledMessage = await channel.updateScheduledFileMessage(
    params: params,
    scheduledMessageId: scheduledMessage.scheduledInfo!.scheduledMessageId,
  );
} catch (e) {
  // Handle error.
}