/ SDKs / Flutter
SDKs
Chat SDKs Flutter v3
Chat SDKs Flutter
Chat SDKs
Flutter
Version 3
Sendbird Chat SDK v3 for Flutter is no longer supported as a new version is released. Check out our latest Chat SDK v4

Freeze and unfreeze a channel

Copy link

Open channels and group channels can be freezed and unfreezed. When a channel is freezed, only the operators can send messages to the channel and users aren't allowed to chat.

An open channel can be freezed only by using Chat API or on Sendbird Dashboard. To freeze an open channel, go to Chat > Open channels on the dashboard, select an open channel you want to freeze, and click the Freeze icon at the upper right corner. To unfreeze, select the frozen channel and click the Freeze icon again.

Group channels can be freezed by operators using the Chat SDK as shown in the code below.

// Freezes a channel.
try {
    await groupChannel.freeze();
} catch (e) {
    // Handle error.
}

// The channel is frozen.
// You can send a message to announce that
// chatting in the channel is unavailable,
// or do something in response to a successful operation.

// Unfreezes a channel.
try {
    await groupChannel.unfreeze();
} catch (e) {
    // Handle error.
}

// The channel is unfreezed.
// You can send a message to announce that
// chatting in the channel is available,
// or do something in response to a successful operation.