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 = true,
  10. bool shouldDeletePreviewFile = false,
  11. bool shouldAutoPreviewVideo = false,
  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.max,
  18. ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown,
  19. CameraLensDirection preferredLensDirection = CameraLensDirection.back,
  20. FlashMode preferredFlashMode = FlashMode.auto,
  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 = true,
  this.shouldDeletePreviewFile = false,
  this.shouldAutoPreviewVideo = false,
  this.maximumRecordingDuration = const Duration(seconds: 15),
  this.minimumRecordingDuration = const Duration(seconds: 1),
  this.theme,
  this.textDelegate,
  this.cameraQuarterTurns = 0,
  this.resolutionPreset = ResolutionPreset.max,
  this.imageFormatGroup = ImageFormatGroup.unknown,
  this.preferredLensDirection = CameraLensDirection.back,
  this.preferredFlashMode = FlashMode.auto,
  this.lockCaptureOrientation,
  this.foregroundBuilder,
  this.previewTransformBuilder,
  this.onEntitySaving,
  this.onError,
  this.onXFileCaptured,
  this.onMinimumRecordDurationNotMet,
}) : assert(
        enableRecording == true || onlyEnableRecording != true,
        'Recording mode error.',
      );