setFlashMode method

Future<void> setFlashMode(
  1. FlashMode mode
)

Implementation

Future<void> setFlashMode(FlashMode mode) async {
  if (controller == null) {
    return;
  }

  try {
    await controller!.setFlashMode(mode);
  } on CameraException catch (e) {
    rethrow;
  }
}