Chat / Flutter
Chat Flutter v3
Chat Flutter
Chat
Flutter
Version 3
Home
/
Chat
/
Flutter
/
Channel

Delete a channel

Copy link

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

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

Delete a group channel

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