Skip to main content

Leave an open channel

Leave an open channel by calling exitChannel() on the OpenChannel instance.

note

Use the callback to confirm whether the leave operation succeeded. Success means error?.isSuccess == true.

Leave an open channel

Method

Dart
Future<int> exitChannel(ErrorHandler handler)

Code example

Dart
final channel = OpenChannel('<open-channel-id>');
await channel.exitChannel((error) {
if (error?.isSuccess == true) {
print('Left open channel');
}
});