setFlashMode method

Future<void> setFlashMode(
  1. FlashMode flashMode
)

Implementation

Future<void> setFlashMode(FlashMode flashMode) async {
  value = value.copyWith(flashMode: flashMode);
  try {
    await _channel.invokeMethod<void>(
      'setFlashMode',
      <String, dynamic>{'flashMode': flashMode.index},
    );
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}