UCameraOptions class

Full configuration of UCameraPage. Every control can be switched off, and controls the device cannot support hide themselves.

Constructors

UCameraOptions({UCameraMode mode = UCameraMode.photo, bool allowMultiple = false, int maxCount = 0, UCameraResolution resolution = UCameraResolution.veryHigh, bool startFront = false, bool enableFlash = true, bool enableCameraSwitch = true, bool enableGrid = true, bool enableLevel = false, bool enablePinchZoom = true, bool enableZoomSlider = false, bool enableZoomPresets = true, bool enableTapToFocus = true, bool enableExposure = true, bool enableSelfTimer = true, bool enableAudio = true, bool enableStabilization = true, bool enableHdr = false, bool enableManualControls = false, bool enableAspectRatioToggle = false, bool confirmCapture = true, bool mirrorFrontPreview = true, bool mirrorFrontCapture = false, Duration? videoMaxDuration, UVideoCodec videoCodec = UVideoCodec.auto, UPhotoFormat photoFormat = UPhotoFormat.jpeg, int photoQuality = 92, BoxFit fit = BoxFit.cover, Color? accentColor, UCameraLabels? labels, Widget overlayBuilder(BuildContext context, UCameraController controller)?})
const

Properties

accentColor → Color?
Highlight color (defaults to the theme's primary).
final
allowMultiple → bool
Lets the user take several photos.
final
confirmCapture → bool
Shows a "use / retake" step after each shot.
final
enableAspectRatioToggle → bool
Lets the user switch 4:3/16:9/1:1.
final
enableAudio → bool
Records sound with video (needs microphone permission).
final
enableCameraSwitch → bool
Shows the switch camera button.
final
enableExposure → bool
Shows an exposure slider.
final
enableFlash → bool
Shows the flash button.
final
enableGrid → bool
Shows the grid button.
final
enableHdr → bool
Uses HDR when available.
final
enableLevel → bool
Shows a horizon level line over the preview.
final
enableManualControls → bool
Reveals ISO, shutter and white-balance sliders on capable devices.
final
enablePinchZoom → bool
Pinch to zoom.
final
enableSelfTimer → bool
Shows a self-timer button.
final
enableStabilization → bool
Uses video stabilization when available.
final
enableTapToFocus → bool
Tap to focus.
final
enableZoomPresets → bool
Shows 0.5x / 1x / 2x quick-zoom chips when the lens range allows it.
final
enableZoomSlider → bool
Shows a zoom slider.
final
fit → BoxFit
How the content fits its box (BoxFit).
final
hashCode → int
The hash code for this object.
no setterinherited
labels → UCameraLabels?
Labels.
final
maxCount → int
Maximum photos in multi mode; 0 means unlimited.
final
mirrorFrontCapture → bool
Mirrors front camera photos.
final
mirrorFrontPreview → bool
Mirrors the front camera preview.
final
mode → UCameraMode
Mode.
final
overlayBuilder → Widget Function(BuildContext context, UCameraController controller)?
Extra chrome drawn over the preview, below the built-in controls.
final
photoFormat → UPhotoFormat
Photo format (JPEG/PNG/HEIC…).
final
photoQuality → int
JPEG quality 1-100.
final
resolution → UCameraResolution
Resolution.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startFront → bool
Starts with the front camera.
final
videoCodec → UVideoCodec
Video codec (H.264/HEVC…).
final
videoMaxDuration → Duration?
Stops recording after this long.
final

Methods

copyWith({UCameraMode? mode, bool? allowMultiple, int? maxCount, bool? startFront, UCameraResolution? resolution}) → UCameraOptions
Copy with some fields changed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toConfig() → UCameraConfig
The engine config these options produce.
toString() → String
A string representation of this object.
inherited

Operators

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