isCameraTorchSupported method
@detail api @author zhangzhenyu.samuel @brief Detect the currently used camera (front/postcondition), whether flash is supported. @return - true: Support - false: Not supported @note You must have called startVideoCapture{@link #RTCEngine#startVideoCapture} for video capture using the SDK internal capture module to detect flash capability.
Implementation
Future<bool?> isCameraTorchSupported() async {
$a() => ($instance as $p_a.RTCEngine).isCameraTorchSupported();
$i() => ($instance as $p_i.ByteRTCEngine).isCameraTorchSupported();
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}