leaveSession method

Future<void> leaveSession()

Leaves the current call session and releases resources.

Implementation

Future<void> leaveSession() async {
  try {
    await CometChatCallsPluginPlatform.instance.nativeLeaveSession();
    _isCallActive = false;
    resetState();
  } catch (e) {
    throw CometChatCallsException(
      ErrorCodeConstants.errorLeaveSession,
      'Failed to leave session',
      e.toString(),
    );
  }
}