@@ -118,31 +118,33 @@ final AssetEntity? entity = await CameraPicker.pickFromCamera(
118
118
119
119
` CameraPickerConfig ` 的成员说明:
120
120
121
- | 参数名 | 类型 | 描述 | 默认值 |
122
- | ------------------------------| -----------------------------| ----------------------------------------------------| --------------------------------------------|
123
- | enableRecording | ` bool ` | 选择器是否可以录像 | ` false ` |
124
- | onlyEnableRecording | ` bool ` | 选择器是否仅可以录像。只在 ` enableRecording ` 为 ` true ` 时有效。 | ` false ` |
125
- | enableTapRecording | ` bool ` | 选择器是否可以单击录像。只在 ` onlyEnableRecording ` 为 ` true ` 时生效。 | ` false ` |
126
- | enableAudio | ` bool ` | 选择器是否需要录制音频。只在 ` enableRecording ` 为 ` true ` 时有效。 | ` true ` |
127
- | enableSetExposure | ` bool ` | 用户是否可以在界面上通过点击设定曝光点 | ` true ` |
128
- | enableExposureControlOnPoint | ` bool ` | 用户是否可以根据已经设置的曝光点调节曝光度 | ` true ` |
129
- | enablePinchToZoom | ` bool ` | 用户是否可以在界面上双指缩放相机对焦 | ` true ` |
130
- | enablePullToZoomInRecord | ` bool ` | 用户是否可以在录制视频时上拉缩放 | ` true ` |
131
- | shouldDeletePreviewFile | ` bool ` | 返回页面时是否删除预览文件 | ` false ` |
132
- | shouldAutoPreviewVideo | ` bool ` | 在预览时是否直接播放视频 | ` false ` |
133
- | maximumRecordingDuration | ` Duration ` | 录制视频最长时长 | ` const Duration(seconds: 15) ` |
134
- | theme | ` ThemeData? ` | 选择器的主题 | ` CameraPicker.themeData(wechatThemeColor) ` |
135
- | textDelegate | ` CameraPickerTextDelegate? ` | 控制部件中的文字实现 | ` CameraPickerTextDelegate ` |
136
- | resolutionPreset | ` ResolutionPreset ` | 相机的分辨率预设 | ` ResolutionPreset.max ` |
137
- | cameraQuarterTurns | ` int ` | 摄像机视图顺时针旋转次数,每次 90 度 | ` 0 ` |
138
- | imageFormatGroup | ` ImageFormatGroup ` | 输出图像的格式描述 | ` ImageFormatGroup.unknown ` |
139
- | preferredLensDirection | ` CameraLensDirection ` | 首次使用相机时首选的镜头方向 | ` CameraLensDirection.back ` |
140
- | lockCaptureOrientation | ` DeviceOrientation? ` | 摄像机在拍摄时锁定的旋转角度 | null |
141
- | foregroundBuilder | ` ForegroundBuilder? ` | 覆盖在相机预览上方的前景构建 | null |
142
- | previewTransformBuilder | ` PreviewTransformBuilder? ` | 对相机预览做变换的构建 | null |
143
- | onEntitySaving | ` EntitySaveCallback? ` | 在查看器中保存图片时的回调 | null |
144
- | onError | ` CameraErrorHandler? ` | 拍摄照片过程中的自定义错误处理 | null |
145
- | onXFileCaptured | ` XFileCapturedCallback? ` | 拍摄文件生成后的回调 | null |
121
+ | 参数名 | 类型 | 描述 | 默认值 |
122
+ | -------------------------------| -----------------------------| ----------------------------------------------------| --------------------------------------------|
123
+ | enableRecording | ` bool ` | 选择器是否可以录像 | ` false ` |
124
+ | onlyEnableRecording | ` bool ` | 选择器是否仅可以录像。只在 ` enableRecording ` 为 ` true ` 时有效。 | ` false ` |
125
+ | enableTapRecording | ` bool ` | 选择器是否可以单击录像。只在 ` onlyEnableRecording ` 为 ` true ` 时生效。 | ` false ` |
126
+ | enableAudio | ` bool ` | 选择器是否需要录制音频。只在 ` enableRecording ` 为 ` true ` 时有效。 | ` true ` |
127
+ | enableSetExposure | ` bool ` | 用户是否可以在界面上通过点击设定曝光点 | ` true ` |
128
+ | enableExposureControlOnPoint | ` bool ` | 用户是否可以根据已经设置的曝光点调节曝光度 | ` true ` |
129
+ | enablePinchToZoom | ` bool ` | 用户是否可以在界面上双指缩放相机对焦 | ` true ` |
130
+ | enablePullToZoomInRecord | ` bool ` | 用户是否可以在录制视频时上拉缩放 | ` true ` |
131
+ | shouldDeletePreviewFile | ` bool ` | 返回页面时是否删除预览文件 | ` false ` |
132
+ | shouldAutoPreviewVideo | ` bool ` | 在预览时是否直接播放视频 | ` false ` |
133
+ | maximumRecordingDuration | ` Duration? ` | 录制视频最长时长 | ` const Duration(seconds: 15) ` |
134
+ | minimumRecordingDuration | ` Duration ` | 录制视频最短时长 | ` const Duration(seconds: 1) ` |
135
+ | theme | ` ThemeData? ` | 选择器的主题 | ` CameraPicker.themeData(wechatThemeColor) ` |
136
+ | textDelegate | ` CameraPickerTextDelegate? ` | 控制部件中的文字实现 | ` CameraPickerTextDelegate ` |
137
+ | resolutionPreset | ` ResolutionPreset ` | 相机的分辨率预设 | ` ResolutionPreset.max ` |
138
+ | cameraQuarterTurns | ` int ` | 摄像机视图顺时针旋转次数,每次 90 度 | ` 0 ` |
139
+ | imageFormatGroup | ` ImageFormatGroup ` | 输出图像的格式描述 | ` ImageFormatGroup.unknown ` |
140
+ | preferredLensDirection | ` CameraLensDirection ` | 首次使用相机时首选的镜头方向 | ` CameraLensDirection.back ` |
141
+ | lockCaptureOrientation | ` DeviceOrientation? ` | 摄像机在拍摄时锁定的旋转角度 | null |
142
+ | foregroundBuilder | ` ForegroundBuilder? ` | 覆盖在相机预览上方的前景构建 | null |
143
+ | previewTransformBuilder | ` PreviewTransformBuilder? ` | 对相机预览做变换的构建 | null |
144
+ | onEntitySaving | ` EntitySaveCallback? ` | 在查看器中保存图片时的回调 | null |
145
+ | onError | ` CameraErrorHandler? ` | 拍摄照片过程中的自定义错误处理 | null |
146
+ | onXFileCaptured | ` XFileCapturedCallback? ` | 拍摄文件生成后的回调 | null |
147
+ | onMinimumRecordDurationNotMet | ` VoidCallback? ` | 录制时长未达到最小时长时的回调方法 | null |
146
148
147
149
### 使用自定义的 ` State `
148
150
0 commit comments