Skip to content

Commit ec3f343

Browse files
committed
🔖 ## 6.0.0-dev.4
1 parent 9a68066 commit ec3f343

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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+
## 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+
713
## 6.0.0-dev.3
814

915
- Unify the back button in the picker on all platforms.

README-ZH.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,18 @@ final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
195195
### 使用自定义代理
196196

197197
```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);
200200
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
201201
context,
202202
provider: provider,
203203
delegate: builder,
204204
);
205205
```
206206

207+
你只能在使用 `pickAssetsWithDelegate` 方法时使用 `keepScrollOffset` 的功能。
208+
更多细节请查看示例内的 `Keep scroll offset` 方法。
209+
207210
### 完整参数的使用方法
208211

209212
欲了解各种选择器模式,请直接运行 example 查看。

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,18 @@ final List<AssetEntity> assets = await AssetPicker.pickAssets(context);
191191
### Using custom delegate
192192

193193
```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);
196196
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
197197
context,
198198
provider: provider,
199199
delegate: builder,
200200
);
201201
```
202202

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+
203206
### Complete param usage
204207

205208
For various type of the picker, head over to the example and run it with no doubt.

guides/migration_guide.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ you can stop reading._
4040

4141
#### `AssetPickerBuilderDelegate`
4242

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`.
4545
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.
4648

49+
Other changes:
4750
- `assetsGridBuilder` is not implemented by default.
48-
4951
- The `findChildIndexBuilder` and `assetsGridItemCount` methods have new signature.
5052
They require calculating placeholders count on iOS/macOS by default.
5153

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: 6.0.0-dev.3
3+
version: 6.0.0-dev.4
44
homepage: https://github.com/fluttercandies/flutter_wechat_assets_picker
55

66
environment:

0 commit comments

Comments
 (0)