CameraPickerConfig class

Configurations for the CameraPicker. CameraPicker 的配置项

Available extensions

Constructors

CameraPickerConfig({bool enableRecording = false, bool onlyEnableRecording = false, bool enableTapRecording = false, bool enableAudio = true, bool enableSetExposure = true, bool enableExposureControlOnPoint = true, bool enablePinchToZoom = true, bool enablePullToZoomInRecord = true, bool enableScaledPreview = true, bool shouldDeletePreviewFile = false, bool shouldAutoPreviewVideo = false, Duration? maximumRecordingDuration = const Duration(seconds: 15), Duration minimumRecordingDuration = const Duration(seconds: 1), ThemeData? theme, CameraPickerTextDelegate? textDelegate, int cameraQuarterTurns = 0, ResolutionPreset resolutionPreset = ResolutionPreset.max, ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown, CameraLensDirection preferredLensDirection = CameraLensDirection.back, FlashMode preferredFlashMode = FlashMode.auto, DeviceOrientation? lockCaptureOrientation, ForegroundBuilder? foregroundBuilder, PreviewTransformBuilder? previewTransformBuilder, EntitySaveCallback? onEntitySaving, CameraErrorHandler? onError, XFileCapturedCallback? onXFileCaptured, VoidCallback? onMinimumRecordDurationNotMet})
const

Properties

cameraQuarterTurns int
The number of clockwise quarter turns the camera view should be rotated. 摄像机视图顺时针旋转次数,每次90度
final
enableAudio bool
Whether the picker should record audio. 选择器录像时是否需要录制声音
final
enableExposureControlOnPoint bool
Whether users can adjust exposure according to the set point. 用户是否可以根据已经设置的曝光点调节曝光度
final
enablePinchToZoom bool
Whether users can zoom the camera by pinch. 用户是否可以在界面上双指缩放相机对焦
final
enablePullToZoomInRecord bool
Whether users can zoom by pulling up when recording video. 用户是否可以在录制视频时上拉缩放
final
enableRecording bool
Whether the picker can record video. 选择器是否可以录像
final
enableScaledPreview bool
Whether the camera preview should be scaled during captures. 拍摄过程中相机预览是否需要缩放
final
enableSetExposure bool
Whether users can set the exposure point by tapping. 用户是否可以在界面上通过点击设定曝光点
final
enableTapRecording bool
Whether allow the record can start with single tap. 选择器是否可以单击录像
final
foregroundBuilder ForegroundBuilder?
Build the foreground/overlay widget with the given CameraValue. 根据给定的 CameraValue 构建自定义的前景 widget
final
hashCode int
The hash code for this object.
no setterinherited
imageFormatGroup ImageFormatGroup
The ImageFormatGroup describes the output of the raw image format. 输出图像的格式描述
final
lockCaptureOrientation DeviceOrientation?
Whether the camera should be locked to the specific orientation during captures. 摄像机在拍摄时锁定的旋转角度
final
maximumRecordingDuration Duration?
The maximum duration of the video recording process. 录制视频最长时长
final
minimumRecordingDuration Duration
The minimum duration of the video recording process. 录制视频最短时长。
final
onEntitySaving EntitySaveCallback?
The callback type define for saving entity in the viewer. 在查看器中保存图片时的回调
final
onError CameraErrorHandler?
The error handler when any error occurred during the picking process. 拍摄照片过程中的自定义错误处理
final
onlyEnableRecording bool
Whether the picker can record video. 选择器是否可以录像
final
onMinimumRecordDurationNotMet VoidCallback?
The callback when the recording is not met the minimum recording duration. 录制时长未达到最小时长时的回调方法。
final
onXFileCaptured XFileCapturedCallback?
The callback type definition when the XFile is captured by the camera. 拍摄文件生成后的回调
final
preferredFlashMode FlashMode
Which flash mode is preferred when first using the camera, typically with the auto mode. 首次使用相机时首选的闪光灯,通常是自动模式。
final
preferredLensDirection CameraLensDirection
Which lens direction is preferred when first using the camera, typically with the front or the back direction. 首次使用相机时首选的镜头方向,通常是前置或后置。
final
previewTransformBuilder PreviewTransformBuilder?
Build the transformed widget with the given CameraController. 根据给定的 CameraController 构建自定义的变换 widget
final
resolutionPreset ResolutionPreset
Present resolution for the camera. 相机的分辨率预设
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldAutoPreviewVideo bool
Whether the video should be played instantly in the preview. 在预览时是否直接播放视频
final
shouldDeletePreviewFile bool
Whether the preview file will be delete when pop. 返回页面时是否删除预览文件
final
textDelegate CameraPickerTextDelegate?
Text delegate that controls text in widgets. 控制部件中的文字实现
final
theme ThemeData?
Theme data for the picker. 选择器的主题
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited