switchCamera static method
void
switchCamera({
- required dynamic onSuccess(
- String onSuccess
- required dynamic onError(
- CometChatCallsException excep
Switches the camera.
onSuccess
: A callback function that is called when the camera is successfully switched.onError
: A callback function that is called when an error occurs while switching the camera.
Example: CometChatCalls.switchCamera( onSuccess: (message) { // The camera was successfully switched. }, onError: (error) { // An error occurred while switching the camera. }, );
Implementation
static void switchCamera(
{required Function(String onSuccess) onSuccess,
required Function(CometChatCallsException excep) onError}) {
CometchatcallsPluginPlatform.instance.switchCamera(onSuccess, onError);
}