CapturePhotoSettings class Null safety

A specification of the features and settings to use for a single photo capture request.

To take a photo, you create and configure a CapturePhotoSettings object, then pass it to the CapturePhotoOutput.capturePhotoWithSettings method.

A CapturePhotoSettings instance can include any combination of settings, regardless of whether that combination is valid for a given capture session. When you initiate a capture by passing a photo settings object to the CapturePhotoOutput.capturePhotoWithSettings method, the photo capture output validate s your settings to ensure deterministic behavior. For example, the flashMode setting must specify a value that is present in the photo output’s CapturePhotoOutput.supportedFlashModes list. For detailed validation rules, see each field's description below.

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

To reuse a specific combination of settings, use the photoSettingsFromPhotoSettings initializer to create a new, unique CapturePhotoSettings instance from an existing photo settings object.

Mixed in types
Annotations
  • @Reference('av_foundation/av_foundation/CapturePhotoSettings')

Constructors

CapturePhotoSettings()
Creates a photo settings object with default settings.
CapturePhotoSettings.photoSettingsWithFormat(Map<String, Object> format)
Creates a photo settings object with the specified output format.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
setFlashMode(int mode) Future<void>
A setting for whether to fire the flash when capturing photos.
toString() String
A string representation of this object.
inherited
uniqueID() Future<int>
A unique identifier for this photo settings instance.

Operators

operator ==(Object other) bool
The equality operator.
inherited