UCameraConfig constructor
const
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,
Implementation
const UCameraConfig({
this.facing = UCameraFacing.back,
this.deviceId,
this.lens,
this.resolution = UCameraResolution.high,
this.photoResolution,
this.previewSize,
this.fps,
this.enableAudio = true,
this.photoFormat = UPhotoFormat.jpeg,
this.photoQuality = 92,
this.videoCodec = UVideoCodec.auto,
this.audioCodec = UAudioCodec.auto,
this.videoContainer = UVideoContainer.mp4,
this.videoBitrate,
this.audioBitrate,
this.stabilization = UStabilizationMode.auto,
this.hdr = UHdrMode.off,
this.nightMode = UNightMode.off,
this.flash = UFlashMode.off,
this.focusMode = UFocusMode.continuousPicture,
this.exposureMode = UExposureMode.auto,
this.whiteBalance = UWhiteBalanceMode.auto,
this.initialZoom,
this.mirrorFrontPreview = true,
this.mirrorFrontCapture = false,
this.lockOrientation,
this.imageStream = false,
this.frameFormat = UFrameFormat.nv21,
this.frameMaxFps = 12,
this.frameDownscale = 1,
this.scanning = false,
this.scanEngine = UScanEngine.auto,
this.scanOptions = const UCodeScanOptions(),
this.scanInterval = const Duration(milliseconds: 120),
this.scanDedupeWindow = const Duration(milliseconds: 1500),
this.maxRecordingDuration,
this.maxRecordingBytes,
this.saveToGallery = false,
this.outputDirectory,
this.keepScreenOn = true,
this.playShutterSound = false,
});