offFlashLight method

Future<void> offFlashLight()

off Flash Light

This off Flash Light

Throws a CameraException if the capture fails.

Implementation

Future<void> offFlashLight() async {
  if (!value.isInitialized! || _isDisposed) {
    throw CameraException(
      'Uninitialized CameraController',
      'startVideoStreaming was called on uninitialized CameraController',
    );
  }
  if (!value.isStreamingVideoRtmp!) {
    throw CameraException(
      'No video is recording',
      'resumeVideoStreaming was called when no video is streaming.',
    );
  }
  if(!Platform.isAndroid){
    throw CameraException(
      'Currently only supports Android platform',
      'Please use on Android platform',
    );
  }
  try {
    await _channel
        .invokeMethod<void>('offFlashLight', <String, dynamic>{
    });
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}