switchToVideoCall static method

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

Switches to a video call.

  • onSuccess: A callback function that is called when the switch is successfully completed.
  • onError: A callback function that is called when an error occurs while switching to the video call.

Example: CometChatCalls.switchToVideoCall( onSuccess: (message) { // The recording was successfully started. }, onError: (error) { // An error occurred while starting the recording. }, );

Implementation

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