leave method Null safety

Future<void> leave()

Leaves this channel

After this method completes successfully, channel event ChannelEventHandler.onUserLeaved will be invoked.

Implementation

Future<void> leave() async {
  await _sdk.api.leaveGroupChannel(channelUrl: channelUrl);
  invitedAt = 0;
  joinedAt = 0;
}