CameraPickerConfig constructor

const CameraPickerConfig({
  1. bool enableRecording = false,
  2. bool onlyEnableRecording = false,
  3. bool enableTapRecording = false,
  4. bool enableAudio = true,
  5. bool enableSetExposure = true,
  6. bool enableExposureControlOnPoint = true,
  7. bool enablePinchToZoom = true,
  8. bool enablePullToZoomInRecord = true,
  9. bool enableScaledPreview = false,
  10. bool shouldDeletePreviewFile = false,
  11. bool shouldAutoPreviewVideo = true,
  12. Duration? maximumRecordingDuration = const Duration(seconds: 15),
  13. Duration minimumRecordingDuration = const Duration(seconds: 1),
  14. ThemeData? theme,
  15. CameraPickerTextDelegate? textDelegate,
  16. int cameraQuarterTurns = 0,
  17. ResolutionPreset resolutionPreset = ResolutionPreset.ultraHigh,
  18. ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown,
  19. CameraLensDirection preferredLensDirection = CameraLensDirection.back,
  20. FlashMode preferredFlashMode = FlashMode.off,
  21. DeviceOrientation? lockCaptureOrientation,
  22. ForegroundBuilder? foregroundBuilder,
  23. PreviewTransformBuilder? previewTransformBuilder,
  24. EntitySaveCallback? onEntitySaving,
  25. CameraErrorHandler? onError,
  26. XFileCapturedCallback? onXFileCaptured,
  27. VoidCallback? onMinimumRecordDurationNotMet,
})

Implementation

const CameraPickerConfig({
  this.enableRecording = false,
  this.onlyEnableRecording = false,
  this.enableTapRecording = false,
  this.enableAudio = true,
  this.enableSetExposure = true,
  this.enableExposureControlOnPoint = true,
  this.enablePinchToZoom = true,
  this.enablePullToZoomInRecord = true,
  this.enableScaledPreview = false,
  this.shouldDeletePreviewFile = false,
  this.shouldAutoPreviewVideo = true,
  this.maximumRecordingDuration = const Duration(seconds: 15),
  this.minimumRecordingDuration = const Duration(seconds: 1),
  this.theme,
  this.textDelegate,
  this.cameraQuarterTurns = 0,
  this.resolutionPreset = ResolutionPreset.ultraHigh,
  this.imageFormatGroup = ImageFormatGroup.unknown,
  this.preferredLensDirection = CameraLensDirection.back,
  this.preferredFlashMode = FlashMode.off,
  this.lockCaptureOrientation,
  this.foregroundBuilder,
  this.previewTransformBuilder,
  this.onEntitySaving,
  this.onError,
  this.onXFileCaptured,
  this.onMinimumRecordDurationNotMet,
}) : assert(
        enableRecording == true || onlyEnableRecording != true,
        'Recording mode error.',
      );