Skip to content

Commit f4dc531

Browse files
committed
📝 Update document with features description
1 parent ea816e6 commit f4dc531

File tree

2 files changed

+54
-43
lines changed

2 files changed

+54
-43
lines changed

README-ZH.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ Language: [English](README.md) | 中文简体
2222

2323
## 特性 ✨
2424

25-
- [x] 💚 99%的微信风格
25+
- [x] 🔐 支持健全的空安全
26+
- [x] 💚 99% 的微信风格
2627
- [x] 📷 支持拍照
28+
- [x] ☀️ 支持设置曝光参数
29+
- [x] 🔍️ 支持捏合缩放
2730
- [x] 🎥 支持录像
2831
- [x] ⏱ 支持限制录像时间
32+
- [x] 🔍 支持录像时缩放
33+
- [x] 🖾 支持自定义前景 widget 构建
2934

3035
## 截图 📸
3136

@@ -37,34 +42,35 @@ Language: [English](README.md) | 中文简体
3742

3843
### 版本限制
3944

40-
Flutter SDK:`>=1.20.0`
45+
Flutter SDK:`>=2.0.0`
46+
47+
### 配置
4148

42-
参考:
4349
- [wechat_assets_picker#准备工作](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/README-ZH.md#preparing-for-use-)
4450
- [camera#installation](https://pub.dev/packages/camera#installation)
4551

4652
## 使用方法 📖
4753

48-
| 参数名 | 类型 | 描述 | 默认值 |
49-
| ---------------------------- | ------------------------------ | ---------------------------------------------------------------- | -------------------------------------- |
50-
| enableRecording | `bool` | 选择器是否可以录像 | `false` |
51-
| onlyEnableRecording | `bool` | 选择器是否仅可以录像。只在 `enableRecording``true` 时有效。 | `false` |
52-
| enableAudio | `bool` | 选择器是否需要录制音频。只于录像配合有效。 | `true` |
53-
| enableSetExposure | `bool` | 用户是否可以在界面上通过点击设定曝光点 | `true` |
54-
| enableExposureControlOnPoint | `bool` | 用户是否可以根据已经设置的曝光点调节曝光度 | `true` |
55-
| enablePinchToZoom | `bool` | 用户是否可以在界面上双指缩放相机对焦 | `true` |
56-
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
57-
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
58-
| maximumRecordingDuration | `Duration` | 录制视频最长时长 | `const Duration(seconds: 15)` |
59-
| theme | `ThemeData` | 选择器的主题 | `CameraPicker.themeData(C.themeColor)` |
60-
| textDelegate | `CameraPickerTextDelegate` | 控制部件中的文字实现 | `DefaultCameraPickerTextDelegate` |
61-
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
62-
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次90度 | `0` |
63-
| imageFormatGroup | `ImageFormatGroup` | 输出图像的格式描述 | `ImageFormatGroup.jpeg` |
64-
| foregroundBuilder | `Widget Function(CameraValue)` | 覆盖在相机预览上方的前景构建 | null |
54+
| 参数名 | 类型 | 描述 | 默认值 |
55+
| ---------------------------- | ------------------------------- | ---------------------------------------------------------------- | -------------------------------------- |
56+
| enableRecording | `bool` | 选择器是否可以录像 | `false` |
57+
| onlyEnableRecording | `bool` | 选择器是否仅可以录像。只在 `enableRecording``true` 时有效。 | `false` |
58+
| enableAudio | `bool` | 选择器是否需要录制音频。只于录像配合有效。 | `true` |
59+
| enableSetExposure | `bool` | 用户是否可以在界面上通过点击设定曝光点 | `true` |
60+
| enableExposureControlOnPoint | `bool` | 用户是否可以根据已经设置的曝光点调节曝光度 | `true` |
61+
| enablePinchToZoom | `bool` | 用户是否可以在界面上双指缩放相机对焦 | `true` |
62+
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
63+
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
64+
| maximumRecordingDuration | `Duration` | 录制视频最长时长 | `const Duration(seconds: 15)` |
65+
| theme | `ThemeData` | 选择器的主题 | `CameraPicker.themeData(C.themeColor)` |
66+
| textDelegate | `CameraPickerTextDelegate?` | 控制部件中的文字实现 | `DefaultCameraPickerTextDelegate` |
67+
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
68+
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次90度 | `0` |
69+
| imageFormatGroup | `ImageFormatGroup` | 输出图像的格式描述 | `ImageFormatGroup.jpeg` |
70+
| foregroundBuilder | `Widget Function(CameraValue)?` | 覆盖在相机预览上方的前景构建 | null |
6571

6672
### 简单的使用方法
6773

6874
```dart
69-
final AssetEntity entity = await CameraPicker.pickFromCamera(context);
75+
final AssetEntity? entity = await CameraPicker.pickFromCamera(context);
7076
```

README.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Language: English | [中文简体](README-ZH.md)
1313

1414
A **camera picker** which is an extension for [wechat_assets_picker](https://fluttercandies.github.io/flutter_wechat_assets_picker). Based on `camera` for camera functions and `photo_manager` for asset implementation.
1515

16-
1716
## Contributors ✨
1817

1918
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -48,10 +47,15 @@ This project follows the [all-contributors](https://github.com/all-contributors/
4847

4948
## Features ✨
5049

51-
- [x] 💚 99% simillar to WeChat style.
50+
- [x] 🔐 Non-nullable by default
51+
- [x] 💚 99% similar to WeChat style
5252
- [x] 📷 Picture taking support
53+
- [x] ☀️ Exposure adjust support
54+
- [x] 🔍️ Scale with pinch support
5355
- [x] 🎥 Video recording support
5456
- [x] ⏱ Duration limitation support
57+
- [x] 🔍 Scale when recording support
58+
- [x] 🖾 Foreground custom widget builder support
5559

5660
## Screenshots 📸
5761

@@ -63,34 +67,35 @@ This project follows the [all-contributors](https://github.com/all-contributors/
6367

6468
### Version constraints
6569

66-
Flutter SDK: `>=1.20.0` .
70+
Flutter SDK: `>=2.0.0` .
71+
72+
### Setup
6773

68-
Reference:
6974
- [wechat_assets_picker#preparing-for-use](https://github.com/fluttercandies/flutter_wechat_assets_picker#preparing-for-use-)
7075
- [camera#installation](https://pub.dev/packages/camera#installation)
7176

7277
## Usage 📖
7378

74-
| Name | Type | Description | Default Value |
75-
| ---------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------- | -------------------------------------- |
76-
| enableRecording | `bool` | Whether the picker can record video. | `false` |
77-
| onlyEnableRecording | `bool` | Whether the picker can only record video. Only available when `enableRecording` is `true `. | `false` |
78-
| enableAudio | `bool` | Whether Whether the picker should record audio. Only available with recording. | `true` |
79-
| enableSetExposure | `bool` | Whether users can set the exposure point by tapping. | `true` |
80-
| enableExposureControlOnPoint | `bool` | Whether users can adjust exposure according to the set point. | `true` |
81-
| enablePinchToZoom | `bool` | Whether users can zoom the camera by pinch. | `true` |
82-
| enablePullToZoomInRecord | `bool` | Whether users can zoom by pulling up when recording video. | `true` |
83-
| shouldDeletePreviewFile | `bool` | Whether the preview file will be delete when pop. | `false` |
84-
| maximumRecordingDuration | `Duration` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` |
85-
| theme | `ThemeData` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` |
86-
| textDelegate | `CameraPickerTextDelegate` | Text delegate that controls text in widgets. | `DefaultCameraPickerTextDelegate` |
87-
| resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.max` |
88-
| cameraQuarterTurns | `int` | The number of clockwise quarter turns the camera view should be rotated. | `0` |
89-
| imageFormatGroup | `ImageFormatGroup` | Describes the output of the raw image format. | `ImageFormatGroup.jpeg` |
90-
| foregroundBuilder | `Widget Function(CameraValue)` | The foreground widget builder which will cover the whole camera preview. | null |
79+
| Name | Type | Description | Default Value |
80+
| ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------- |
81+
| enableRecording | `bool` | Whether the picker can record video. | `false` |
82+
| onlyEnableRecording | `bool` | Whether the picker can only record video. Only available when `enableRecording` is `true `. | `false` |
83+
| enableAudio | `bool` | Whether Whether the picker should record audio. Only available with recording. | `true` |
84+
| enableSetExposure | `bool` | Whether users can set the exposure point by tapping. | `true` |
85+
| enableExposureControlOnPoint | `bool` | Whether users can adjust exposure according to the set point. | `true` |
86+
| enablePinchToZoom | `bool` | Whether users can zoom the camera by pinch. | `true` |
87+
| enablePullToZoomInRecord | `bool` | Whether users can zoom by pulling up when recording video. | `true` |
88+
| shouldDeletePreviewFile | `bool` | Whether the preview file will be delete when pop. | `false` |
89+
| maximumRecordingDuration | `Duration` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` |
90+
| theme | `ThemeData` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` |
91+
| textDelegate | `CameraPickerTextDelegate?` | Text delegate that controls text in widgets. | `DefaultCameraPickerTextDelegate` |
92+
| resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.max` |
93+
| cameraQuarterTurns | `int` | The number of clockwise quarter turns the camera view should be rotated. | `0` |
94+
| imageFormatGroup | `ImageFormatGroup` | Describes the output of the raw image format. | `ImageFormatGroup.jpeg` |
95+
| foregroundBuilder | `Widget Function(CameraValue)?` | The foreground widget builder which will cover the whole camera preview. | null |
9196

9297
### Simple usage
9398

9499
```dart
95-
final AssetEntity entity = await CameraPicker.pickFromCamera(context);
100+
final AssetEntity? entity = await CameraPicker.pickFromCamera(context);
96101
```

0 commit comments

Comments
 (0)