setCameraTorch method

FutureOr<int> setCameraTorch(
  1. TorchState torchState
)

@detail api @author zhangzhenyu.samuel @brief Turn on/off the flash state of the currently used camera (front/postcondition) @param torchState Flash state. Refer to TorchState{@link #TorchState} @return - 0: Success. - < 0: Failure. See ReturnStatus{@link #ReturnStatus} for more details. @note - The flash can only be set if you have called startVideoCapture{@link #RTCEngine#startVideoCapture} for video capture using the SDK internal capture module. - The setting result fails after calling stopVideoCapture{@link #RTCEngine#stopVideoCapture} to turn off internal collection.

Implementation

FutureOr<int> setCameraTorch(TorchState torchState) async {
  return await nativeCall('setCameraTorch', [torchState.$value]);
}