UCameraConfig constructor

const UCameraConfig({
  1. UCameraFacing facing = UCameraFacing.back,
  2. String? deviceId,
  3. UCameraLens? lens,
  4. UCameraResolution resolution = UCameraResolution.high,
  5. UCameraResolution? photoResolution,
  6. UCameraSize? previewSize,
  7. double? fps,
  8. bool enableAudio = true,
  9. UPhotoFormat photoFormat = UPhotoFormat.jpeg,
  10. int photoQuality = 92,
  11. UVideoCodec videoCodec = UVideoCodec.auto,
  12. UAudioCodec audioCodec = UAudioCodec.auto,
  13. UVideoContainer videoContainer = UVideoContainer.mp4,
  14. int? videoBitrate,
  15. int? audioBitrate,
  16. UStabilizationMode stabilization = UStabilizationMode.auto,
  17. UHdrMode hdr = UHdrMode.off,
  18. UNightMode nightMode = UNightMode.off,
  19. UFlashMode flash = UFlashMode.off,
  20. UFocusMode focusMode = UFocusMode.continuousPicture,
  21. UExposureMode exposureMode = UExposureMode.auto,
  22. UWhiteBalanceMode whiteBalance = UWhiteBalanceMode.auto,
  23. double? initialZoom,
  24. bool mirrorFrontPreview = true,
  25. bool mirrorFrontCapture = false,
  26. UCameraOrientation? lockOrientation,
  27. bool imageStream = false,
  28. UFrameFormat frameFormat = UFrameFormat.nv21,
  29. double frameMaxFps = 12,
  30. int frameDownscale = 1,
  31. bool scanning = false,
  32. UScanEngine scanEngine = UScanEngine.auto,
  33. UCodeScanOptions scanOptions = const UCodeScanOptions(),
  34. Duration scanInterval = const Duration(milliseconds: 120),
  35. Duration scanDedupeWindow = const Duration(milliseconds: 1500),
  36. Duration? maxRecordingDuration,
  37. int? maxRecordingBytes,
  38. bool saveToGallery = false,
  39. String? outputDirectory,
  40. bool keepScreenOn = true,
  41. 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,
});