startRecording static method

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

Starts a new recording.

  • onSuccess: A callback function that is called when the recording is successfully started.
  • onError: A callback function that is called when an error occurs while starting the recording.

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

Implementation

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