Skip to content

Commit bf5daf2

Browse files
feat: Upgrade photo_manager version to 3.x (#506)
Signed-off-by: CaiJingLong <[email protected]> Co-authored-by: Alex Li <[email protected]>
1 parent 70c5a00 commit bf5daf2

11 files changed

+60
-45
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ that can be found in the LICENSE file. -->
66

77
See the [Migration Guide](guides/migration_guide.md) for the details of breaking changes between versions.
88

9+
## 8.9.0-dev.1
10+
11+
### Breaking changes
12+
13+
- Migrate to Flutter 3.16, and drop supports for previous Flutter versions.
14+
- Bump `photo_manager` to v3.x.
15+
- Export `photo_manager_image_provider`.
16+
917
## 8.8.0
1018

1119
### New features

README-ZH.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ Language: [English](README.md) | 中文
2929

3030
查看 [迁移指南][] 了解如何从破坏性改动中迁移为可用代码。
3131

32+
## 版本兼容
33+
34+
该插件仅保证能与 **stable 渠道的 Flutter SDK** 配合使用。
35+
我们不会为其他渠道的 Flutter SDK 做实时支持。
36+
37+
| | 3.0 | 3.3 | 3.7 | 3.10 | 3.13 | 3.16 |
38+
|--------|:---:|:---:|:---:|:----:|:----:|:----:|
39+
| 8.7.0+ |||||||
40+
| 8.7.0+ |||||||
41+
| 8.5.0+ |||||||
42+
| 8.4.0+ |||||||
43+
| 8.0.0+ |||||||
44+
| 7.3.0+ |||||||
45+
46+
如果在 `flutter pub get` 时遇到了 `resolve conflict` 失败问题,
47+
请使用 `dependency_overrides` 解决。
48+
3249
## 主要使用的 package
3350

3451
该插件基于这些优秀的 package 构建:
@@ -49,14 +66,14 @@ Language: [English](README.md) | 中文
4966

5067
<!-- TOC -->
5168
* [Flutter WeChat Assets Picker](#flutter-wechat-assets-picker)
69+
* [版本兼容](#版本兼容)
5270
* [主要使用的 package](#主要使用的-package)
5371
* [特性 ✨](#特性-)
5472
* [特别提醒 📝](#特别提醒-)
5573
* [项目展柜 🖼️](#项目展柜-)
5674
* [截图 📸](#截图-)
5775
* [开始前的注意事项 ‼️](#开始前的注意事项-)
5876
* [准备工作 🍭](#准备工作-)
59-
* [版本兼容](#版本兼容)
6077
* [Flutter](#flutter)
6178
* [Android](#android)
6279
* [权限](#权限)
@@ -141,22 +158,6 @@ Language: [English](README.md) | 中文
141158

142159
## 准备工作 🍭
143160

144-
### 版本兼容
145-
146-
该插件仅保证能与 **stable 渠道的 Flutter SDK** 配合使用。
147-
我们不会为其他渠道的 Flutter SDK 做实时支持。
148-
149-
| | 3.0 | 3.3 | 3.7 | 3.10 | **3.13** |
150-
|--------|:---:|:---:|:---:|:----:|:--------:|
151-
| 8.7.0+ ||||||
152-
| 8.5.0+ ||||||
153-
| 8.4.0+ ||||||
154-
| 8.0.0+ ||||||
155-
| 7.3.0+ ||||||
156-
157-
如果在 `flutter pub get` 时遇到了 `resolve conflict` 失败问题,
158-
请使用 `dependency_overrides` 解决。
159-
160161
### Flutter
161162

162163
执行 `flutter pub add wechat_assets_picker`

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ The package is a standalone extension that can to be used with combination.
3131

3232
See the [Migration Guide][] to learn how to migrate between breaking changes.
3333

34+
## Versions compatibility
35+
36+
The package only guarantees to be working on **the stable version of Flutter**.
37+
We won't update it in real-time to align with other channels of Flutter.
38+
39+
| | 3.0 | 3.3 | 3.7 | 3.10 | 3.13 | 3.16 |
40+
|--------|:---:|:---:|:---:|:----:|:----:|:----:|
41+
| 8.7.0+ |||||||
42+
| 8.7.0+ |||||||
43+
| 8.5.0+ |||||||
44+
| 8.4.0+ |||||||
45+
| 8.0.0+ |||||||
46+
| 7.3.0+ |||||||
47+
48+
If you got a `resolve conflict` error when running `flutter pub get`,
49+
please use `dependency_overrides` to fix it.
50+
3451
## Package credits
3552

3653
The package is built from these wonderful packages.
@@ -51,14 +68,14 @@ submit issues to our issue tracker first.
5168

5269
<!-- TOC -->
5370
* [Flutter WeChat Assets Picker](#flutter-wechat-assets-picker)
71+
* [Versions compatibility](#versions-compatibility)
5472
* [Package credits](#package-credits)
5573
* [Features ✨](#features-)
5674
* [Notes 📝](#notes-)
5775
* [Projects using this plugin 🖼️](#projects-using-this-plugin-)
5876
* [Screenshots 📸](#screenshots-)
5977
* [READ THIS FIRST ‼️](#read-this-first-)
6078
* [Preparing for use 🍭](#preparing-for-use-)
61-
* [Versions compatibility](#versions-compatibility)
6279
* [Flutter](#flutter)
6380
* [Android](#android)
6481
* [Permissions](#permissions)
@@ -147,22 +164,6 @@ before you have any questions.
147164

148165
## Preparing for use 🍭
149166

150-
### Versions compatibility
151-
152-
The package only guarantees to be working on **the stable version of Flutter**.
153-
We won't update it in real-time to align with other channels of Flutter.
154-
155-
| | 3.0 | 3.3 | 3.7 | 3.10 | **3.13** |
156-
|--------|:---:|:---:|:---:|:----:|:--------:|
157-
| 8.7.0+ ||||||
158-
| 8.5.0+ ||||||
159-
| 8.4.0+ ||||||
160-
| 8.0.0+ ||||||
161-
| 7.3.0+ ||||||
162-
163-
If you got a `resolve conflict` error when running `flutter pub get`,
164-
please use `dependency_overrides` to fix it.
165-
166167
### Flutter
167168

168169
Run `flutter pub add wechat_assets_picker`,

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
1212
import 'package:flutter/semantics.dart';
1313
import 'package:flutter/services.dart';
1414
import 'package:photo_manager/photo_manager.dart';
15+
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
1516
import 'package:provider/provider.dart';
1617

1718
import '../constants/constants.dart';

lib/src/delegates/asset_picker_viewer_builder_delegate.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import 'package:flutter/material.dart';
1010
import 'package:flutter/semantics.dart';
1111
import 'package:flutter/services.dart';
1212
import 'package:photo_manager/photo_manager.dart';
13+
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
1314
import 'package:provider/provider.dart';
1415

1516
import '../constants/custom_scroll_physics.dart';

lib/src/widget/builder/asset_entity_grid_item_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'package:extended_image/extended_image.dart';
66
import 'package:flutter/material.dart';
7-
import 'package:photo_manager/photo_manager.dart';
7+
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
88

99
import '../../internal/singleton.dart';
1010
import '../../widget/scale_text.dart';

lib/src/widget/builder/image_page_builder.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:extended_image/extended_image.dart';
88
import 'package:flutter/material.dart';
99
import 'package:flutter/services.dart';
1010
import 'package:photo_manager/photo_manager.dart';
11+
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
1112
import 'package:video_player/video_player.dart';
1213

1314
import '../../delegates/asset_picker_viewer_builder_delegate.dart';

lib/src/widget/gaps.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class SliverGap extends StatelessWidget {
6060
Widget build(BuildContext context) {
6161
Widget child;
6262
if (_width != null) {
63-
child = Gap.h(_width!, height: _height, color: color);
63+
child = Gap.h(_width, height: _height, color: color);
6464
} else if (_height != null) {
65-
child = Gap.v(_height!, width: _width, color: color);
65+
child = Gap.v(_height, width: _width, color: color);
6666
} else {
6767
child = const SizedBox.shrink();
6868
}

lib/src/widget/scale_text.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class ScaleText extends StatelessWidget {
3636
@override
3737
Widget build(BuildContext context) {
3838
final MediaQueryData mqd = MediaQuery.of(context);
39-
final double effectiveFactor = mqd.textScaleFactor.clamp(
40-
minScaleFactor,
41-
maxScaleFactor,
39+
final effectiveScaler = mqd.textScaler.clamp(
40+
minScaleFactor: minScaleFactor,
41+
maxScaleFactor: maxScaleFactor,
4242
);
4343
return MediaQuery(
44-
data: mqd.copyWith(textScaleFactor: effectiveFactor),
44+
data: mqd.copyWith(textScaler: effectiveScaler),
4545
child: Text(
4646
text,
4747
style: style,

lib/wechat_assets_picker.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
library wechat_assets_picker;
66

77
export 'package:photo_manager/photo_manager.dart';
8+
export 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
89

910
export 'src/constants/config.dart';
1011
export 'src/constants/constants.dart' hide packageName;

0 commit comments

Comments
 (0)