Skip to content

Commit b54b32f

Browse files
committed
🔖 ## 5.0.3
1 parent 981a9a2 commit b54b32f

File tree

4 files changed

+51
-47
lines changed

4 files changed

+51
-47
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 5.0.3
8+
9+
- Remove required annotation for selected assets.
10+
711
## 5.0.2
812

913
- Fix wrong viewer provider state.

README-ZH.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Language: [English](README.md) | 中文简体
3939
* [常见问题](#常见问题-)
4040
* [`xxx` 版本获取冲突 (例如 `dartx`)](#xxx-版本获取冲突-例如-dartx)
4141
* [如何获取资源的路径以进行上传或编辑等操作的整合?](#如何获取资源的路径以进行上传或编辑等操作的整合)
42-
* [如何更改Recent或其他路径的名称或属性?](#如何更改recent或其他路径的名称或属性)
43-
* [`File``Uint8List`创建`AssetEntity`的方法](#从file或uint8list创建assetentity的方法)
42+
* [如何更改 'Recent' 或其他路径的名称或属性?](#如何更改-recent-或其他路径的名称或属性)
43+
* [ `File``Uint8List` 创建 `AssetEntity` 的方法](#从-file-或-uint8list-创建-assetentity-的方法)
4444
* [控制台提示 'Failed to find GeneratedAppGlideModule'](#控制台提示-failed-to-find-generatedappglidemodule)
4545

4646
## 迁移指南 ♻️
@@ -79,13 +79,13 @@ Language: [English](README.md) | 中文简体
7979

8080
### 版本限制
8181

82-
Flutter SDK:`>=1.17.0`
82+
Flutter SDK:`>=2.0.0`
8383

8484
如果在 `flutter pub get` 时遇到了失败问题,请使用 `dependency_overrides` 解决。参考[这里](#xxx-版本获取冲突-例如-dartx)
8585

8686
### Flutter
8787

88-
`wechat_assets_picker`添加至`pubspec.yaml`引用。
88+
`wechat_assets_picker` 添加至 `pubspec.yaml` 引用。
8989

9090
```yaml
9191
dependencies:
@@ -145,26 +145,26 @@ platform :ios, '9.0'
145145

146146
## 使用方法 📖
147147

148-
| 参数名 | 类型 | 描述 | 默认值 |
149-
| ------------------------- | --------------------- | ------------------------------------------------ | ------------------- |
150-
| maxAssets | `int` | 最多选择的图片数量 | 9 |
151-
| pageSize | `int` | 分页加载时每页加载的资源数量。**必须为网格数的倍数。** 设置为`null`可以取消分页。 | 320 (80 * 4) |
152-
| pathThumbSize | `int` | 选择器的缩略图大小 | 80 |
153-
| gridCount | `int` | 选择器网格数量 | 4 |
154-
| previewThumbSize | `List<int>` | 预览时图片的缩略图大小 | `null` |
155-
| requestType | `RequestType` | 选择器选择资源的类型 | `RequestType.image` |
156-
| specialPickerType | `SpecialPickerType` | 提供一些特殊的选择器类型以整合非常规的选择行为 | `null` |
157-
| selectedAssets | `List<AssetEntity>` | 已选的资源。确保不重复选择。如果你允许重复选择,请将其置空。 | `null` |
158-
| themeColor | `Color` | 选择器的主题色 | `Color(0xff00bc56)` |
159-
| pickerTheme | `ThemeData` | 选择器的主题提供,包括查看器 | `null` |
160-
| sortPathDelegate | `SortPathDeleage` | 资源路径的排序实现,可自定义路径排序方法 | `CommonSortPathDelegate` |
161-
| textDelegate | `DefaultAssetsPickerTextDelegate` | 选择器的文本代理构建,用于自定义文本 | `DefaultAssetsPickerTextDelegate()` |
162-
| filterOptions | `FilterOptionGroup` | 允许用户自定义资源过滤条件 | `null` |
163-
| specialItemBuilder | `WidgetBuilder` | 自定义item的构造方法 | `null` |
164-
| specialItemPosition | `SpecialItemPosition` | 允许用户在选择器中添加一个自定义item,并指定位置。 | `SpecialPosition.none` |
165-
| allowSpecialItemWhenEmpty | `bool` | 在资源为空时是否允许显示自定义item | `false` |
166-
| routeCurve | `Curve` | 选择构造路由动画的曲线 | `Curves.easeIn` |
167-
| routeDuration | `Duration` | 选择构造路由动画的时间 | `const Duration(milliseconds: 500)` |
148+
| 参数名 | 类型 | 描述 | 默认值 |
149+
| ------------------------- | ---------------------- | ------------------------------------------------ | ------------------- |
150+
| selectedAssets | `List<AssetEntity>?` | 已选的资源。确保不重复选择。如果你允许重复选择,请将其置空。 | `null` |
151+
| maxAssets | `int` | 最多选择的图片数量 | 9 |
152+
| pageSize | `int` | 分页加载时每页加载的资源数量。**必须为网格数的倍数。** 设置为`null`可以取消分页。 | 320 (80 * 4) |
153+
| pathThumbSize | `int` | 选择器的缩略图大小 | 80 |
154+
| gridCount | `int` | 选择器网格数量 | 4 |
155+
| requestType | `RequestType` | 选择器选择资源的类型 | `RequestType.image` |
156+
| previewThumbSize | `List<int>?` | 预览时图片的缩略图大小 | `null` |
157+
| specialPickerType | `SpecialPickerType?` | 提供一些特殊的选择器类型以整合非常规的选择行为 | `null` |
158+
| themeColor | `Color?` | 选择器的主题色 | `Color(0xff00bc56)` |
159+
| pickerTheme | `ThemeData?` | 选择器的主题提供,包括查看器 | `null` |
160+
| sortPathDelegate | `SortPathDeleage?` | 资源路径的排序实现,可自定义路径排序方法 | `CommonSortPathDelegate` |
161+
| textDelegate | `DefaultAssetsPickerTextDelegate?` | 选择器的文本代理构建,用于自定义文本 | `DefaultAssetsPickerTextDelegate()` |
162+
| filterOptions | `FilterOptionGroup?` | 允许用户自定义资源过滤条件 | `null` |
163+
| specialItemBuilder | `WidgetBuilder?` | 自定义item的构造方法 | `null` |
164+
| specialItemPosition | `SpecialItemPosition` | 允许用户在选择器中添加一个自定义item,并指定位置。 | `SpecialPosition.none` |
165+
| allowSpecialItemWhenEmpty | `bool` | 在资源为空时是否允许显示自定义item | `false` |
166+
| routeCurve | `Curve` | 选择构造路由动画的曲线 | `Curves.easeIn` |
167+
| routeDuration | `Duration` | 选择构造路由动画的时间 | `const Duration(milliseconds: 500)` |
168168

169169
### 简单的使用方法
170170

@@ -324,7 +324,7 @@ dependency_overrides:
324324

325325
如果再此之后你仍然需要路径,那么可以通过已获得的 `File` 对象获取: `file.absolutePath`。
326326

327-
### 如何更改Recent或其他路径的名称或属性?
327+
### 如何更改 'Recent' 或其他路径的名称或属性?
328328

329329
由 `photo_manager` 传递的 “Recent” 路径,包含了您设备上的所有的 `AssetEntity`。大部分的平台都会将这个路径命名为 “Recent”。尽管我们提供了自定义文字构建的能力,但是 `AssetPathEntity` 的名字或属性只能通过 `SortPathDelegate` 进行更改。这是你能访问到所有 `AssetPathEntity` 的唯一方法,或者说,是现阶段我们暴露出来的唯一方法。
330330

@@ -356,7 +356,7 @@ class CustomSortPathDelegate extends SortPathDelegate {
356356

357357
将你的构建传递至静态调用方法里,而后你就会看到你自定义了名称的路径。
358358

359-
### `File``Uint8List`创建`AssetEntity`的方法
359+
### `File``Uint8List` 创建 `AssetEntity` 的方法
360360

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

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -166,26 +166,26 @@ platform :osx, '10.15'
166166

167167
## Usage 📖
168168

169-
| Name | Type | Description | Default |
170-
| ------------------------- | -------------------------- | ------------------------------------------------------------ | ----------------------------------- |
171-
| maxAssets | `int` | Maximum asset that the picker can pick. | 9 |
172-
| pageSize | `int` | Assets amount when assets loaded with paging. **Must be a multiple of `gridCount`.** Nullable for non paging. | 320 (80 * 4) |
173-
| pathThumbSize | `int` | The size of thumb data in picker. | 80 |
174-
| gridCount | `int` | Grid count in picker. | 4 |
175-
| previewThumbSize | `List<int>` | Thumb size for the preview of images in the viewer. | `null` |
176-
| requestType | `RequestType` | Request type for picker. | `RequestType.image` |
177-
| specialPickerType | `SpacialPickerType` | Provide some special picker types to integrate un-common pick pattern. | `null` |
178-
| selectedAssets | `List<AssetEntity>` | Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. | `null` |
179-
| themeColor | `Color` | Main theme color for the picker | `Color(0xff00bc56)` |
180-
| pickerTheme | `ThemeData` | Theme data provider for the picker and the viewer. | `null` |
181-
| sortPathDelegate | `SortPathDeleage` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` |
182-
| textDelegate | `AssetsPickerTextDelegate` | Text delegate for the picker, for customize the texts. | `DefaultAssetsPickerTextDelegate()` |
183-
| filterOptions | `FilterOptionGroup` | Allow users to customize assets filter options. | `null` |
184-
| specialItemBuilder | `WidgetBuilder` | The widget builder for the special item. | `null` |
185-
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
186-
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
187-
| routeCurve | `Curve` | The curve which the picker use to build page route transition. | `Curves.easeIn` |
188-
| routeDuration | `Duration` | The duration which the picker use to build page route transition. | `const Duration(milliseconds: 500)` |
169+
| Name | Type | Description | Default |
170+
| ------------------------- | --------------------------- | ------------------------------------------------------------ | ----------------------------------- |
171+
| selectedAssets | `List<AssetEntity>?` | Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. | `null` |
172+
| maxAssets | `int` | Maximum asset that the picker can pick. | 9 |
173+
| pageSize | `int` | Assets amount when assets loaded with paging. **Must be a multiple of `gridCount`.** Nullable for non paging. | 320 (80 * 4) |
174+
| pathThumbSize | `int` | The size of thumb data in picker. | 80 |
175+
| gridCount | `int` | Grid count in picker. | 4 |
176+
| requestType | `RequestType` | Request type for picker. | `RequestType.image` |
177+
| previewThumbSize | `List<int>?` | Thumb size for the preview of images in the viewer. | `null` |
178+
| specialPickerType | `SpacialPickerType?` | Provide some special picker types to integrate un-common pick pattern. | `null` |
179+
| themeColor | `Color?` | Main theme color for the picker | `Color(0xff00bc56)` |
180+
| pickerTheme | `ThemeData?` | Theme data provider for the picker and the viewer. | `null` |
181+
| sortPathDelegate | `SortPathDeleage?` | Path entities sort delegate for the picker, sort paths as you want. | `CommonSortPathDelegate` |
182+
| textDelegate | `AssetsPickerTextDelegate?` | Text delegate for the picker, for customize the texts. | `DefaultAssetsPickerTextDelegate()` |
183+
| filterOptions | `FilterOptionGroup?` | Allow users to customize assets filter options. | `null` |
184+
| specialItemBuilder | `WidgetBuilder?` | The widget builder for the special item. | `null` |
185+
| specialItemPosition | `SpecialItemPosition` | Allow users set a special item in the picker with several positions. | `SpecialItemPosition.none` |
186+
| allowSpecialItemWhenEmpty | `bool` | Whether the special item will display or not when assets is empty. | `false` |
187+
| routeCurve | `Curve` | The curve which the picker use to build page route transition. | `Curves.easeIn` |
188+
| routeDuration | `Duration` | The duration which the picker use to build page route transition. | `const Duration(milliseconds: 500)` |
189189

190190
### Simple usage
191191

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wechat_assets_picker
22
description: An audio/video/image picker in pure Dart which is the same with WeChat, support multi picking.
3-
version: 5.0.2
3+
version: 5.0.3
44
homepage: https://github.com/fluttercandies/flutter_wechat_assets_picker
55

66
environment:

0 commit comments

Comments
 (0)