endSession static method

void endSession({
  1. required dynamic onSuccess(
    1. String onSuccess
    ),
  2. required dynamic onError(
    1. CometChatCallsException excep
    ),
})

Ends the session.

  • onSuccess: A callback function that is called when the session is successfully ended.
  • onError: A callback function that is called when an error occurs while ending the session.

Example: CometChatCalls.endSession( onSuccess: (message) { // The session was successfully ended. }, onError: (error) { // An error occurred while ending the session. }, );

Implementation

static void endSession({
  required Function(String onSuccess) onSuccess,
  required Function(CometChatCallsException excep) onError
}) {
  CometchatcallsPluginPlatform.instance.endSession(onSuccess, onError);
}