Skip to content

Commit c5e0fb9

Browse files
committed
📝 Improve READMEs
1 parent 1fdd9c9 commit c5e0fb9

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

README-ZH.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ Language: [English](README.md) | 中文
109109

110110
## 开始前的注意事项 ‼️
111111

112-
该库与 [photo_manager][photo_manager pub] 有强关联性,
113-
大部分方法的行为是由 photo_manager 进行控制的。
114-
115-
在选择器中最常使用的 API 是:
116-
- [`AssetEntity`](https://pub.flutter-io.cn/documentation/photo_manager/latest/photo_manager/AssetEntity-class.html)
117-
- [`AssetPathEntity`](https://pub.flutter-io.cn/documentation/photo_manager/latest/photo_manager/AssetPathEntity-class.html)
112+
在开始一切之前,请明确以下两点:
113+
- 由于理解差异和篇幅限制,并不是所有的内容都会明确地在文档中指出。
114+
当你遇到没有找到需求和无法理解的概念时,请先运行项目的示例 example,
115+
它可以解决 90% 的常见需求。
116+
- 该库与 [photo_manager][photo_manager pub] 有强关联性,
117+
大部分方法的行为是由 photo_manager 进行控制的,
118+
所以请尽可能地确保你了解以下两个类的概念:
119+
- 资源(图片/视频/音频) [`AssetEntity`](https://pub.flutter-io.cn/documentation/photo_manager/latest/photo_manager/AssetEntity-class.html)
120+
- 资源合集(相册或集合概念) [`AssetPathEntity`](https://pub.flutter-io.cn/documentation/photo_manager/latest/photo_manager/AssetPathEntity-class.html)
118121

119122
当你有与相关的 API 和行为的疑问时,你可以查看
120123
[photo_manager API 文档][] 了解更多细节。
@@ -210,7 +213,7 @@ import 'package:wechat_assets_picker/wechat_assets_picker.dart';
210213
### macOS
211214

212215
1.`macos/Podfile` 中指定最低构建版本至 **10.15**
213-
```ruby
216+
```Podfile
214217
platform :osx, '10.15'
215218
```
216219
2. 使用 **Xcode** 打开 `macos/Runner.xcworkspace`
@@ -279,7 +282,7 @@ final List<AssetEntity>? result = await AssetPicker.pickAssets(
279282
| selectPredicate | `AssetSelectPredicate` | 判断资源可否被选择 | `null` |
280283
| shouldRevertGrid | `bool?` | 判断资源网格是否需要倒序排列 | `null` |
281284
| limitedPermissionOverlayPredicate | `LimitedPermissionOverlayPredicate?` | 判断有限的权限情况下是否展示提示页面 | `null` |
282-
| pathNameBuilder | `PathNameBuilder<AssetPathEntity>?` | 构建自定义路径名称 | `null` |
285+
| pathNameBuilder | `PathNameBuilder<AssetPathEntity>?` | 基于路径(相册)构建自定义名称的方法 | `null` |
283286

284287
-`maxAssets` 等于 `1`(即单选模式),搭配
285288
`SpecialPickerType.noPreview` 使用会在用户点选资源换时立刻选中并返回。

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,16 @@ See the [Migration Guide][] to learn how to migrate between breaking changes.
114114

115115
## READ THIS FIRST ‼️
116116

117-
The package works closely with the [photo_manager][photo_manager pub] plugin,
118-
and most behaviors are controlled by the plugin.
119-
120-
The most frequent APIs that used in the picker are:
121-
- [`AssetEntity`](https://pub.dev/documentation/photo_manager/latest/photo_manager/AssetEntity-class.html)
122-
- [`AssetPathEntity`](https://pub.dev/documentation/photo_manager/latest/photo_manager/AssetPathEntity-class.html)
117+
Be aware of below notices before you started anything:
118+
- Due to understanding differences and the limitation of a single document,
119+
documents will not cover all the contents.
120+
If you find nothing related to your expected features and cannot understand about concepts,
121+
run the example project and check every options first.
122+
It has covered 90% of regular requests with the package.
123+
- The package deeply integrates with the [photo_manager][photo_manager pub] plugin,
124+
make sure you understand these two concepts as much as possible:
125+
- Asset (photos/videos/audio) - [`AssetEntity`](https://pub.dev/documentation/photo_manager/latest/photo_manager/AssetEntity-class.html)
126+
- Assets collection (albums/libraries) - [`AssetPathEntity`](https://pub.dev/documentation/photo_manager/latest/photo_manager/AssetPathEntity-class.html)
123127

124128
When you have questions about related APIs and behaviors,
125129
check [photo_manager's API docs][] for more details.
@@ -199,7 +203,7 @@ consider declare only relevant permission in your apps, more specifically:
199203

200204
1. Platform version has to be at least *11.0*.
201205
Modify `ios/Podfile` and update accordingly.
202-
```ruby
206+
```Podfile
203207
platform :ios, '11.0'
204208
```
205209
2. Add the following content to `Info.plist`.
@@ -288,7 +292,7 @@ Fields in `AssetPickerConfig`:
288292
| selectPredicate | `AssetSelectPredicate` | Predicate whether an asset can be selected or unselected. | `null` |
289293
| shouldRevertGrid | `bool?` | Whether the assets grid should revert. | `null` |
290294
| limitedPermissionOverlayPredicate | `LimitedPermissionOverlayPredicate?` | Predicate whether the limited permission overlay should be displayed. | `null` |
291-
| pathNameBuilder | `PathNameBuilder<AssetPathEntity>?` | Build customized path name. | `null` |
295+
| pathNameBuilder | `PathNameBuilder<AssetPathEntity>?` | Build customized path (album) name with the given path entity. | `null` |
292296

293297
- When `maxAssets` equals to `1` (a.k.a. single picking mode),
294298
use `SpecialPickerType.noPreview` will immediately select asset

0 commit comments

Comments
 (0)