isCameraTorchSupported abstract method

Future<bool> isCameraTorchSupported()

Checks whether the device supports camera flash.

This method must be called after the camera is successfully enabled, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). This method is for Android and iOS only. The app enables the front camera by default. If your front camera does not support flash, this method returns false. If you want to check whether the rear camera supports the flash function, call switchCamera before this method. On iPads with system version 15, even if isCameraTorchSupported returns true, you might fail to successfully enable the flash by calling setCameraTorchOn due to system issues.

Returns true : The device supports camera flash. false : The device does not support camera flash.

Implementation

Future<bool> isCameraTorchSupported();