File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ Language: [English](README.md) | 中文简体
45
45
| ------------------------ | -------------------------- | ----------------------------------------------------------------- | -------------------------------------- |
46
46
| isAllowRecording | ` bool ` | 选择器是否可以录像 | ` false ` |
47
47
| isOnlyAllowRecording | ` bool ` | 选择器是否仅可以录像。只在 ` isAllowRecording ` 为 ` true ` 时有效。 | ` false ` |
48
+ | enabledAudio | ` bool ` | 选择器是否需要录制音频。只于录像配合有效。 | ` true ` |
48
49
| maximumRecordingDuration | ` Duration ` | 录制视频最长时长 | ` const Duration(seconds: 15) ` |
49
50
| theme | ` ThemeData ` | 选择器的主题 | ` CameraPicker.themeData(C.themeColor) ` |
50
51
| textDelegate | ` CameraPickerTextDelegate ` | 控制部件中的文字实现 | ` DefaultCameraPickerTextDelegate ` |
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ Reference:
71
71
| ------------------------ | -------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------- |
72
72
| isAllowRecording | ` bool ` | Whether the picker can record video. | ` false ` |
73
73
| isOnlyAllowRecording | ` bool ` | Whether the picker can only record video. Only available when ` isAllowRecording ` is ` true ` . | ` false ` |
74
+ | enableAudio | ` bool ` | Whether Whether the picker should record audio. Only available with recording. | ` true ` |
74
75
| maximumRecordingDuration | ` Duration ` | The maximum duration of the video recording process. | ` const Duration(seconds: 15) ` |
75
76
| theme | ` ThemeData ` | Theme data for the picker. | ` CameraPicker.themeData(C.themeColor) ` |
76
77
| textDelegate | ` CameraPickerTextDelegate ` | Text delegate that controls text in widgets. | ` DefaultCameraPickerTextDelegate ` |
Original file line number Diff line number Diff line change @@ -242,6 +242,9 @@ class CameraPickerState extends State<CameraPicker> {
242
242
243
243
/// Whether the picker should record audio. (A non-null wrapper)
244
244
/// 选择器录制视频时,是否需要录制音频(非空包装)
245
+ ///
246
+ /// No audio integration required when it's only for camera.
247
+ /// 在仅允许拍照时不需要启用音频
245
248
bool get enableAudio => isAllowRecording && (widget.enableAudio ?? true );
246
249
247
250
/// Getter for `widget.maximumRecordingDuration` .
You can’t perform that action at this time.
0 commit comments