Skip to content

Commit c83958d

Browse files
committed
📝 Documents update.
1 parent 9643a1a commit c83958d

File tree

2 files changed

+40
-16
lines changed

2 files changed

+40
-16
lines changed

README-ZH.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
[![pub package](https://img.shields.io/pub/v/wechat_assets_picker?color=42a012&label=%E7%A8%B3%E5%AE%9A%E7%89%88&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
44
[![pub package](https://img.shields.io/pub/v/wechat_assets_picker?color=42a012&include_prereleases&label=%E5%BC%80%E5%8F%91%E7%89%88&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
55
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_assets_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/stargazers)
6+
[![Build status](https://img.shields.io/github/workflow/status/fluttercandies/flutter_wechat_assets_picker/Build%20test?label=%E7%8A%B6%E6%80%81&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/actions?query=workflow%3A%22Build+test%22)
67
[![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_assets_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/network)
7-
[![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_assets_picker?style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/LICENSE)
8+
[![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_assets_picker?label=%E5%8D%8F%E8%AE%AE&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/LICENSE)
89
<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>
910

1011
Language: [English](README.md) | 中文简体
@@ -13,19 +14,20 @@ Language: [English](README.md) | 中文简体
1314

1415
## 目录 🗂
1516

16-
* [特性](#特性-)
17-
* [截图 📸](#截图-📸)
18-
* [准备工作 🍭](#准备工作-🍭)
17+
* [特性](#特性-)
18+
* [截图](#截图-)
19+
* [准备工作](#准备工作-)
1920
* [Flutter](#flutter)
2021
* [Android](#android)
2122
* [iOS](#ios)
22-
* [使用方法 📖](#使用方法-📖)
23+
* [使用方法](#使用方法-)
2324
* [简单的使用方法](#简单的使用方法)
2425
* [完整参数的使用方法](#完整参数的使用方法)
2526
* [注册资源变化回调](#注册资源变化回调)
26-
* [类介绍 💭](#类介绍-💭)
27+
* [类介绍](#类介绍-)
2728
* [`AssetEntity`](#assetentity)
28-
* [常见问题 ❔](#常见问题-❔)
29+
* [常见问题](#常见问题-)
30+
* [如何获取资源的路径以进行上传或编辑等操作的整合?](#如何获取资源的路径以进行上传或编辑等操作的整合?)
2931
* [`File``Uint8List`创建`AssetEntity`的方法](#从file或uint8list创建assetentity的方法)
3032
* [控制台提示 'Failed to find GeneratedAppGlideModule'](#控制台提示-failed-to-find-generatedappglidemodule)
3133

@@ -65,6 +67,10 @@ dependencies:
6567
wechat_assets_picker: ^latest_version
6668
```
6769
70+
最新的**稳定**版本是: [![pub package](https://img.shields.io/pub/v/wechat_assets_picker?logo=dart&label=stable&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
71+
72+
最新的**开发**版本是: [![pub package](https://img.shields.io/pub/v/wechat_assets_picker?color=42a012&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
73+
6874
在你的代码中导入:
6975
7076
```dart
@@ -73,9 +79,9 @@ import 'package:wechat_assets_picker/wechat_assets_picker.dart';
7379

7480
### Android
7581

76-
应用至少需要声明三个权限`INTERNET` `READ_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE`
82+
需要声明的权限`INTERNET`, `READ_EXTERNAL_STORAGE`, `WRITE_EXTERNAL_STORAGE`, `ACCESS_MEDIA_LOCATION`
7783

78-
如果你发现有一些警告日志输出,那么主项目组就需要要实现 `AppGlideModule`。比如:
84+
如果你发现有一些与`Glide`有关的警告日志输出,那么主项目就需要要实现 `AppGlideModule`。比如:
7985
`example/android/app/build.gradle`:
8086
```gradle
8187
apply plugin: 'com.android.application'
@@ -120,6 +126,11 @@ rootProject.allprojects {
120126

121127
### iOS
122128

129+
`ios/Podfile` 中指定最低构建版本至 *9.0*
130+
```
131+
platform :ios, '9.0'
132+
```
133+
123134
将以下内容添加至`info.plist`
124135

125136
```
@@ -271,6 +282,14 @@ Future<AssetEntity> refreshProperties() async;
271282

272283
## 常见问题 ❔
273284

285+
### 如何获取资源的路径以进行上传或编辑等操作的整合?
286+
287+
你不需要获得路径(也许)。
288+
289+
`File` 对象可以通过 `entity.originFile` 获得,如果需要 `Uint8List` 则使用 `entity.originBytes`
290+
291+
如果再此之后你仍然需要路径,那么可以通过已获得的 `File` 对象获取: `file.absolutePath`
292+
274293
### `File``Uint8List`创建`AssetEntity`的方法
275294

276295
如果需要使用此库结合一些拍照需求,可通过以下方法将`File``Uint8List`转为`AssetEntity`

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![pub package](https://img.shields.io/pub/v/wechat_assets_picker?logo=dart&label=stable&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
44
[![pub package](https://img.shields.io/pub/v/wechat_assets_picker?color=42a012&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
55
[![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_assets_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/stargazers)
6+
[![Build status](https://img.shields.io/github/workflow/status/fluttercandies/flutter_wechat_assets_picker/Build%20test?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/actions?query=workflow%3A%22Build+test%22)
67
[![CodeFactor](https://img.shields.io/codefactor/grade/github/fluttercandies/flutter_wechat_assets_picker?logo=codefactor&logoColor=%23ffffff&style=flat-square)](https://www.codefactor.io/repository/github/fluttercandies/flutter_wechat_assets_picker)
78
[![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_assets_picker?style=flat-square)](https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/master/LICENSE)
89
<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,19 +14,19 @@ An **assets picker** which looks like the one in WeChat, based on `photo_manager
1314

1415
## Category 🗂
1516

16-
* [Features](#features-)
17-
* [Screenshots 📸](#screenshots-📸)
18-
* [Preparing for use 🍭](#preparing-for-use-🍭)
17+
* [Features](#features-)
18+
* [Screenshots](#screenshots-)
19+
* [Preparing for use](#preparing-for-use-)
1920
* [Flutter](#flutter)
2021
* [Android](#android)
2122
* [iOS](#ios)
22-
* [Usage 📖](#usage-📖)
23+
* [Usage](#usage-)
2324
* [Simple usage](#simple-usage)
2425
* [Complete param usage](#complete-param-usage)
2526
* [Register assets change observe callback](#register-assets-change-observe-callback)
26-
* [Classes Introduction 💭](#classes-introduction-💭)
27+
* [Classes Introduction](#classes-introduction-)
2728
* [`AssetEntity`](#assetentity)
28-
* [Frequent asked question](#frequent-asked-question-)
29+
* [Frequent asked question](#frequent-asked-question-)
2930
* [Create `AssetEntity` from `File` or `Uint8List` (rawData)](#create-assetentity-from-file-or-uint8list-rawdata)
3031
* [Console warning 'Failed to find GeneratedAppGlideModule'](#glide-warning-failed-to-find-generatedappglidemodule)
3132

@@ -64,6 +65,11 @@ Add `wechat_assets_picker` to `pubspec.yaml` dependencies.
6465
dependencies:
6566
wechat_assets_picker: ^latest_version
6667
```
68+
69+
The latest **stable** version is: [![pub package](https://img.shields.io/pub/v/wechat_assets_picker?logo=dart&label=stable&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
70+
71+
The latest **dev** version is: [![pub package](https://img.shields.io/pub/v/wechat_assets_picker?color=42a012&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_assets_picker)
72+
6773
Then import the package in your code:
6874
```dart
6975
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
@@ -285,7 +291,6 @@ You can always request the `File` object with `entity.originFile`, if `Uint8List
285291

286292
If you still needs path after requested the `File`, get it through `file.absolutePath`.
287293

288-
289294
### Create `AssetEntity` from `File` or `Uint8List` (rawData)
290295

291296
In order to combine this package with camera shooting or something related, there's a wordaround about how to create an `AssetEntity` with `File` or `Uint8List` object.

0 commit comments

Comments
 (0)