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

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.
}