UCameraConfig class
Everything a session configures up front. Values the device cannot honour are ignored rather than failing the session.
Constructors
- UCameraConfig({UCameraFacing facing = UCameraFacing.back, String? deviceId, UCameraLens? lens, UCameraResolution resolution = UCameraResolution.high, UCameraResolution? photoResolution, UCameraSize? previewSize, double? fps, bool enableAudio = true, UPhotoFormat photoFormat = UPhotoFormat.jpeg, int photoQuality = 92, UVideoCodec videoCodec = UVideoCodec.auto, UAudioCodec audioCodec = UAudioCodec.auto, UVideoContainer videoContainer = UVideoContainer.mp4, int? videoBitrate, int? audioBitrate, UStabilizationMode stabilization = UStabilizationMode.auto, UHdrMode hdr = UHdrMode.off, UNightMode nightMode = UNightMode.off, UFlashMode flash = UFlashMode.off, UFocusMode focusMode = UFocusMode.continuousPicture, UExposureMode exposureMode = UExposureMode.auto, UWhiteBalanceMode whiteBalance = UWhiteBalanceMode.auto, double? initialZoom, bool mirrorFrontPreview = true, bool mirrorFrontCapture = false, UCameraOrientation? lockOrientation, bool imageStream = false, UFrameFormat frameFormat = UFrameFormat.nv21, double frameMaxFps = 12, int frameDownscale = 1, bool scanning = false, UScanEngine scanEngine = UScanEngine.auto, UCodeScanOptions scanOptions = const UCodeScanOptions(), Duration scanInterval = const Duration(milliseconds: 120), Duration scanDedupeWindow = const Duration(milliseconds: 1500), Duration? maxRecordingDuration, int? maxRecordingBytes, bool saveToGallery = false, String? outputDirectory, bool keepScreenOn = true, bool playShutterSound = false})
-
const
Properties
- audioBitrate → int?
-
final
- audioCodec → UAudioCodec
-
final
- deviceId → String?
-
Overrides facing and lens when set.
final
- enableAudio → bool
-
final
- exposureMode → UExposureMode
-
final
- facing → UCameraFacing
-
final
- flash → UFlashMode
-
final
- focusMode → UFocusMode
-
final
- fps → double?
-
final
- frameDownscale → int
-
Integer downscale applied natively before frames reach Dart.
final
- frameFormat → UFrameFormat
-
final
- frameMaxFps → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hdr → UHdrMode
-
final
- imageStream → bool
-
Deliver analysis frames to UCameraController.frames.
final
- initialZoom → double?
-
final
- keepScreenOn → bool
-
final
- lens → UCameraLens?
-
final
- lockOrientation → UCameraOrientation?
-
final
- maxRecordingBytes → int?
-
final
- maxRecordingDuration → Duration?
-
final
- mirrorFrontCapture → bool
-
final
- mirrorFrontPreview → bool
-
final
- needsFrames → bool
-
no setter
- nightMode → UNightMode
-
final
- outputDirectory → String?
-
final
- photoFormat → UPhotoFormat
-
final
- photoQuality → int
-
final
- photoResolution → UCameraResolution?
-
Falls back to resolution when null.
final
- playShutterSound → bool
-
final
- previewSize → UCameraSize?
-
final
- resolution → UCameraResolution
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saveToGallery → bool
-
final
- scanDedupeWindow → Duration
-
final
- scanEngine → UScanEngine
-
final
- scanInterval → Duration
-
final
- scanning → bool
-
Start barcode scanning as soon as the session is ready.
final
- scanOptions → UCodeScanOptions
-
final
- stabilization → UStabilizationMode
-
final
- videoBitrate → int?
-
final
- videoCodec → UVideoCodec
-
final
- videoContainer → UVideoContainer
-
final
- whiteBalance → UWhiteBalanceMode
-
final
Methods
-
copyWith(
{UCameraFacing? facing, String? deviceId, UCameraLens? lens, UCameraResolution? resolution, double? fps, bool? enableAudio, UFlashMode? flash, UFocusMode? focusMode, double? initialZoom, bool? imageStream, bool? scanning, UScanEngine? scanEngine, UCodeScanOptions? scanOptions, UFrameFormat? frameFormat, double? frameMaxFps, UCameraOrientation? lockOrientation, bool? mirrorFrontPreview, UStabilizationMode? stabilization, UHdrMode? hdr, UNightMode? nightMode}) → UCameraConfig -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited