Skip to content

Commit 4686d82

Browse files
committed
📝 Improve docs with new sections and relative packages
1 parent be5c1de commit 4686d82

File tree

2 files changed

+60
-62
lines changed

2 files changed

+60
-62
lines changed

README-ZH.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,51 @@ that can be found in the LICENSE file. -->
66

77
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?logo=dart&label=%E7%A8%B3%E5%AE%9A%E7%89%88&style=flat-square)](https://pub.flutter-io.cn/packages/wechat_camera_picker)
88
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?color=42a012&include_prereleases&label=%E5%BC%80%E5%8F%91%E7%89%88&logo=dart&style=flat-square)](https://pub.flutter-io.cn/packages/wechat_camera_picker)
9-
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers)
10-
[![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/network)
11-
[![Build status](https://img.shields.io/github/actions/workflow/status/fluttercandies/flutter_wechat_camera_picker/runnable.yml?branch=main&label=CI&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions/workflows/runnable.yml)
129
[![CodeFactor](https://img.shields.io/codefactor/grade/github/fluttercandies/flutter_wechat_camera_picker?logo=codefactor&label=%E4%BB%A3%E7%A0%81%E8%B4%A8%E9%87%8F&logoColor=%23ffffff&style=flat-square)](https://www.codefactor.io/repository/github/fluttercandies/flutter_wechat_camera_picker)
10+
11+
[![Build status](https://img.shields.io/github/actions/workflow/status/fluttercandies/flutter_wechat_camera_picker/runnable.yml?branch=main&label=CI&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions/workflows/runnable.yml)
1312
[![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_camera_picker?style=flat-square&label=%E5%8D%8F%E8%AE%AE)](https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/master/LICENSE)
14-
<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=5bcc0gy"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="FlutterCandies" title="FlutterCandies"></a>
13+
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers)
14+
[![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/network)
15+
16+
[![Flutter Candies QQ群](https://pub.idqqimg.com/wpa/images/group.png)](https://jq.qq.com/?_wv=1027&k=5bcc0gy)
1517

16-
Language: [English](README.md) | 中文简体
18+
Language: [English](README.md) | 中文
1719

18-
基于微信界面的相机选择器,可单独运行,是
19-
[wechat_assets_picker][wechat_assets_picker pub] 的扩展。
20-
选择器基于 `camera` 实现相机相关功能,`photo_manager` 实现资源相关内容。
20+
基于 **微信 UI** 的 Flutter 相机选择器,可以单独运行,
21+
同时是 [wechat_assets_picker][wechat_assets_picker pub] 的扩展。
2122

2223
当前的界面设计基于的微信版本:**8.3.x**
2324
界面更新将在微信版本更新后随时进行跟进。
2425

2526
查看 [迁移指南][] 了解如何从破坏性改动中迁移为可用代码。
2627

28+
## 主要使用的 package
29+
30+
该插件基于这些优秀的 package 构建:
31+
32+
| Name | Features |
33+
|:-----------------------------------|:------------|
34+
| [photo_manager][photo_manager pub] | 资源的基础抽象和管理。 |
35+
| [camera][camera pub] | 拍摄图片和视频。 |
36+
| [video_player][video_player pub] | 播放对应的视频和音频。 |
37+
38+
这些 package 在该插件中的实现已相对稳定。
39+
如果你在使用中发现于它们相关的问题,
40+
请先在本插件的问题跟踪中报告相关问题。
41+
2742
<details>
2843
<summary>目录列表</summary>
2944

3045
<!-- TOC -->
3146
* [Flutter WeChat Camera Picker](#flutter-wechat-camera-picker)
47+
* [主要使用的 package](#主要使用的-package)
3248
* [特性 ✨](#特性-)
3349
* [截图 📸](#截图-)
3450
* [开始前的注意事项 ‼️](#开始前的注意事项-)
3551
* [准备工作 🍭](#准备工作-)
3652
* [版本兼容](#版本兼容)
3753
* [配置](#配置)
38-
* [Android 13 (API 33) 权限配置](#android-13-api-33-权限配置)
3954
* [使用方法 📖](#使用方法-)
4055
* [国际化](#国际化)
4156
* [简单的使用方法](#简单的使用方法)
@@ -107,7 +122,6 @@ Language: [English](README.md) | 中文简体
107122

108123
执行 `flutter pub add wechat_camera_picker`
109124
或者将 `wechat_camera_picker` 手动添加至 `pubspec.yaml` 引用。
110-
111125
```yaml
112126
dependencies:
113127
wechat_camera_picker: ^latest_version
@@ -119,31 +133,14 @@ dependencies:
119133
最新的 **开发** 版本是:
120134
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?color=9d00ff&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.flutter-io.cn/packages/wechat_camera_picker)
121135
122-
在你的代码中导入:
123-
124-
```dart
125-
import 'package:wechat_camera_picker/wechat_camera_picker.dart';
126-
```
127-
128-
更多配置步骤:
136+
运行前,按照这些步骤逐一配置:
129137
- [wechat_assets_picker#准备工作](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/README-ZH.md#preparing-for-use-)
130138
- [camera#installation](https://pub.flutter-io.cn/packages/camera#installation)
131139
132-
#### Android 13 (API 33) 权限配置
133-
134-
在使用这个 package 时,请确保
135-
`compileSdkVersion``targetSdkVersion` 升级到 `33`
136-
否则,在 Android 13 设备上将有可能无法加载任何资源。
137-
138-
如果你不需要拍照或录像,你可以考虑将对应权限移除:
140+
在你的代码中导入:
139141
140-
```xml
141-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
142-
<!-- 如果需要拍照,添加该权限 -->
143-
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
144-
<!-- 如果需要录像,添加该权限 -->
145-
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
146-
</manifest>
142+
```dart
143+
import 'package:wechat_camera_picker/wechat_camera_picker.dart';
147144
```
148145

149146
## 使用方法 📖
@@ -230,5 +227,7 @@ https://github.com/flutter/flutter/issues/89216 。
230227

231228
[wechat_assets_picker pub]: https://pub.flutter-io.cn/packages/wechat_assets_picker
232229
[photo_manager pub]: https://pub.flutter-io.cn/packages/photo_manager
230+
[camera pub]: https://pub.flutter-io.cn/packages/camera
231+
[video_player pub]: https://pub.flutter-io.cn/packages/video_player
233232
[迁移指南]: https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/main/guides/migration_guide.md
234233
[photo_manager API 文档]: https://pub.flutter-io.cn/documentation/photo_manager/latest/

README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,52 @@ that can be found in the LICENSE file. -->
66

77
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?logo=dart&label=stable&style=flat-square)](https://pub.dev/packages/wechat_camera_picker)
88
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?color=42a012&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_camera_picker)
9-
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers)
10-
[![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/network)
11-
[![Build status](https://img.shields.io/github/actions/workflow/status/fluttercandies/flutter_wechat_camera_picker/runnable.yml?branch=main&label=CI&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions/workflows/runnable.yml)
129
[![CodeFactor](https://img.shields.io/codefactor/grade/github/fluttercandies/flutter_wechat_camera_picker?logo=codefactor&logoColor=%23ffffff&style=flat-square)](https://www.codefactor.io/repository/github/fluttercandies/flutter_wechat_camera_picker)
10+
11+
[![Build status](https://img.shields.io/github/actions/workflow/status/fluttercandies/flutter_wechat_camera_picker/runnable.yml?branch=main&label=CI&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions/workflows/runnable.yml)
1312
[![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_camera_picker?style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/master/LICENSE)
14-
<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=5bcc0gy"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="FlutterCandies" title="FlutterCandies"></a>
13+
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers)
14+
[![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/network)
15+
16+
[![Flutter Candies QQ群](https://pub.idqqimg.com/wpa/images/group.png)](https://jq.qq.com/?_wv=1027&k=5bcc0gy)
1517

16-
Language: English | [中文简体](README-ZH.md)
18+
Language: English | [中文](README-ZH.md)
1719

18-
A **camera picker** based on WeChat's UI which is a separate runnable extension to
20+
A **camera picker** for Flutter projects based on WeChat's UI,
21+
which is also a separate runnable extension to the
1922
[wechat_assets_picker][wechat_assets_picker pub].
20-
The package based on `camera` for camera functions
21-
and `photo_manager` for asset implementation.
2223

2324
Current WeChat version that UI based on: **8.3.x**
2425
UI designs will be updated following the WeChat update in anytime.
2526

2627
See the [Migration Guide][] to learn how to migrate between breaking changes.
2728

29+
## Package credits
30+
31+
The package is built from these wonderful packages.
32+
33+
| Name | Features |
34+
|:-----------------------------------|:--------------------------------------------------|
35+
| [photo_manager][photo_manager pub] | The basic abstractions and management for assets. |
36+
| [camera][camera pub] | Captures images and videos. |
37+
| [video_player][video_player pub] | Plays videos and audios correspondingly. |
38+
39+
Their implementation should be relatively stable in the package.
40+
If you've found any issues related to them when using the picker,
41+
submit issues to our issue tracker first.
42+
2843
<details>
2944
<summary>Table of content</summary>
3045

3146
<!-- TOC -->
3247
* [Flutter WeChat Camera Picker](#flutter-wechat-camera-picker)
48+
* [Package credits](#package-credits)
3349
* [Features ✨](#features-)
3450
* [Screenshots 📸](#screenshots-)
3551
* [READ THIS FIRST ‼️](#read-this-first-)
3652
* [Preparing for use 🍭](#preparing-for-use-)
3753
* [Versions compatibility](#versions-compatibility)
3854
* [Setup](#setup)
39-
* [Android 13 (API 33) permissions](#android-13-api-33-permissions)
4055
* [Usage 📖](#usage-)
4156
* [Localizations](#localizations)
4257
* [Simple usage](#simple-usage)
@@ -122,31 +137,13 @@ The latest **stable** version is:
122137
The latest **dev** version is:
123138
[![pub package](https://img.shields.io/pub/v/wechat_camera_picker?color=9d00ff&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_camera_picker)
124139
125-
Then import the package in your code:
126-
```dart
127-
import 'package:wechat_camera_picker/wechat_camera_picker.dart';
128-
```
129-
130-
See also:
140+
Follow these detailed setup guide before runs:
131141
- [wechat_assets_picker#preparing-for-use](https://github.com/fluttercandies/flutter_wechat_assets_picker#preparing-for-use-)
132142
- [camera#installation](https://pub.dev/packages/camera#installation)
133143
134-
#### Android 13 (API 33) permissions
135-
136-
When using the package, please upgrade
137-
`targetSdkVersion` and `compileSdkVersion` to `33`.
138-
Otherwise, no assets can be fetched on Android 13.
139-
140-
If you don't need to take photos or videos,
141-
consider removing relevant permission in your apps, more specifically:
142-
143-
```xml
144-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
145-
<!-- Add this if you need to take photos. -->
146-
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
147-
<!-- Add this if you need to take videos. -->
148-
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
149-
</manifest>
144+
Then import the package in your code:
145+
```dart
146+
import 'package:wechat_camera_picker/wechat_camera_picker.dart';
150147
```
151148

152149
## Usage 📖
@@ -266,5 +263,7 @@ This project follows the [all-contributors](https://github.com/all-contributors/
266263

267264
[wechat_assets_picker pub]: https://pub.dev/packages/wechat_assets_picker
268265
[photo_manager pub]: https://pub.dev/packages/photo_manager
266+
[camera pub]: https://pub.dev/packages/camera
267+
[video_player pub]: https://pub.dev/packages/video_player
269268
[Migration Guide]: https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/main/guides/migration_guide.md
270269
[photo_manager's API docs]: https://pub.dev/documentation/photo_manager/latest/

0 commit comments

Comments
 (0)