capturePhotoWithSettings method

Future<void> capturePhotoWithSettings(
  1. CapturePhotoSettings settings,
  2. CapturePhotoCaptureDelegate delegate
)

Initiates a photo capture using the specified settings.

Use this method for all variations of still photography, including single photo capture, RAW format capture (with or without a secondary format such as JPEG), bracketed capture of multiple images, and Live Photo capture.

When you call this method, the photo output validates the properties of your settings object to ensure deterministic behavior. For example, the flashMode setting must specify a value that is present in the photo output’s CapturePhotoOutput.supportedFlashModes list. See each property’s description in he CapturePhotoSettings class reference for detailed validation rules.

It is illegal to reuse a CapturePhotoSettings instance for multiple captures. Calling this method throws an exception (PlatformException) if the settings object’s uniqueID value matches that of any previously used settings object. Call any of the CapturePhotoSettings.photoSettingsWith... methods to reset the settings object.

Implementation

Future<void> capturePhotoWithSettings(
  CapturePhotoSettings settings,
  CapturePhotoCaptureDelegate delegate,
) {
  return _channel.$capturePhotoWithSettings(this, settings, delegate);
}