leave method Null safety

Future<void> leave(
  1. {bool? shouldRemoveOperatorStatus}
)

Leaves this channel

After this method completes successfully, channel event ChannelEventHandler.onUserLeaved will be invoked. When shouldRemoveOperatorStatus is true it will remove user from operator if user is operator

Implementation

Future<void> leave({bool? shouldRemoveOperatorStatus}) async {
  await _sdk.api.send(GroupChannelLeaveRequest(
    channelUrl: channelUrl,
    shouldRemoveOperatorStatus: shouldRemoveOperatorStatus,
  ));
  invitedAt = 0;
  joinedAt = 0;
}