Chat / Flutter
Current version: v3
Chat Flutter v3
Chat Flutter
Chat
Flutter
Home
/
Chat
/
Flutter
/
Channel

Delete a channel

Only channel operators are allowed to delete a channel. If a non-operator attempts to delete a channel, an error is thrown, which should be handled through the try and catch blocks. To delete a channel, use the code below.

Delete an open channel

try {
    await openChannel.deleteChannel();
    // The channel is successfully deleted from the client app.
} catch (e) {
    // Handle error.
}

Delete a group channel

try {
    await groupChannel.deleteChannel();
    // The channel is successfully deleted from the client app.
} catch (e) {
    // Handle error.
}