File tree Expand file tree Collapse file tree 5 files changed +22
-8
lines changed Expand file tree Collapse file tree 5 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## 6.0.0-dev.4
8
+
9
+ - Add ` keepScrollOffset ` feature for the ` AssetPickerBuilderDelegate ` ,
10
+ which allow users to keep the scroll offset between pickings.
11
+ - Remove manually controlled logs with ` photo_manager ` .
12
+
7
13
## 6.0.0-dev.3
8
14
9
15
- Unify the back button in the picker on all platforms.
Original file line number Diff line number Diff line change @@ -195,15 +195,18 @@ final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
195
195
### 使用自定义代理
196
196
197
197
``` dart
198
- final YourAssetPickerProvider provider = your_provider ;
199
- final CustomAssetPickerBuilderDelegate builder = your_builder (provider);
198
+ final YourAssetPickerProvider provider = yourProvider ;
199
+ final CustomAssetPickerBuilderDelegate builder = yourBuilder (provider);
200
200
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
201
201
context,
202
202
provider: provider,
203
203
delegate: builder,
204
204
);
205
205
```
206
206
207
+ 你只能在使用 ` pickAssetsWithDelegate ` 方法时使用 ` keepScrollOffset ` 的功能。
208
+ 更多细节请查看示例内的 ` Keep scroll offset ` 方法。
209
+
207
210
### 完整参数的使用方法
208
211
209
212
欲了解各种选择器模式,请直接运行 example 查看。
Original file line number Diff line number Diff line change @@ -191,15 +191,18 @@ final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
191
191
### Using custom delegate
192
192
193
193
``` dart
194
- final YourAssetPickerProvider provider = your_provider ;
195
- final CustomAssetPickerBuilderDelegate builder = your_builder (provider);
194
+ final YourAssetPickerProvider provider = yourProvider ;
195
+ final CustomAssetPickerBuilderDelegate builder = yourBuilder (provider);
196
196
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
197
197
context,
198
198
provider: provider,
199
199
delegate: builder,
200
200
);
201
201
```
202
202
203
+ You can use the ` keepScrollOffset ` feature only with the ` pickAssetsWithDelegate ` method.
204
+ See the ` Keep scroll offset ` pick method in the example for how to implement it.
205
+
203
206
### Complete param usage
204
207
205
208
For various type of the picker, head over to the example and run it with no doubt.
Original file line number Diff line number Diff line change @@ -40,12 +40,14 @@ you can stop reading._
40
40
41
41
#### ` AssetPickerBuilderDelegate `
42
42
43
- - This delegate requires a new argument ` initialPermission ` with ` PermissionState ` type when using.
44
- The intention of this change is to be capable with various of ` PermissionState ` .
43
+ New arguments:
44
+ - ` PermissionState initialPermission ` : The intention of this change is to be capable with various of ` PermissionState ` .
45
45
If your delegate didn't require a permission check, you can pass ` PermissionState.authorized ` directly.
46
+ - ` keepScrollOffset ` : To hold the provider and delegate without disposing,
47
+ and keep the scroll offset with the last picking.
46
48
49
+ Other changes:
47
50
- ` assetsGridBuilder ` is not implemented by default.
48
-
49
51
- The ` findChildIndexBuilder ` and ` assetsGridItemCount ` methods have new signature.
50
52
They require calculating placeholders count on iOS/macOS by default.
51
53
Original file line number Diff line number Diff line change 1
1
name : wechat_assets_picker
2
2
description : An audio/video/image picker in pure Dart which is the same with WeChat, support multi picking.
3
- version : 6.0.0-dev.3
3
+ version : 6.0.0-dev.4
4
4
homepage : https://github.com/fluttercandies/flutter_wechat_assets_picker
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments