Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Set burn duration

Configure the burn countdown duration for private chats using the OpenIM Flutter SDK.

Copy

Configure the automatic destruction countdown duration for messages after they are read in private chat mode:

Parameters

ParameterTypeRequiredDescription
conversationIDStringYesTarget conversation ID.
reqConversationReqYesConversation modification request object. Specify burnDuration in seconds (for example, 30).

Code example

await OpenIM.iMManager.conversationManager.setConversation(
  conversationID,
  ConversationReq(burnDuration: 30),
);

Return value

A successful Future indicates that the burn duration has been saved on the server. Enabling or disabling private chat mode itself requires setting isPrivateChat; see Set private chat. Do not confuse this setting with server-side scheduled message destruction.

State changes after the call

Multi-device synchronization and arriving changes trigger conversation change events. The client updates burnDuration on the local conversation model using conversationID as the merge key. For complete listener integration, see Retrieve conversation list.