Skip to content

Commit

Permalink
feat: Upgrade photo_manager version to 3.x (#506)
Browse files Browse the repository at this point in the history
Signed-off-by: CaiJingLong <cjl_spy@163.com>
Co-authored-by: Alex Li <github@alexv525.com>
  • Loading branch information
CaiJingLong and AlexV525 authored Nov 16, 2023
1 parent 70c5a00 commit bf5daf2
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 45 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ that can be found in the LICENSE file. -->

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

## 8.9.0-dev.1

### Breaking changes

- Migrate to Flutter 3.16, and drop supports for previous Flutter versions.
- Bump `photo_manager` to v3.x.
- Export `photo_manager_image_provider`.

## 8.8.0

### New features
Expand Down
35 changes: 18 additions & 17 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ Language: [English](README.md) | 中文

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

## 版本兼容

该插件仅保证能与 **stable 渠道的 Flutter SDK** 配合使用。
我们不会为其他渠道的 Flutter SDK 做实时支持。

| | 3.0 | 3.3 | 3.7 | 3.10 | 3.13 | 3.16 |
|--------|:---:|:---:|:---:|:----:|:----:|:----:|
| 8.7.0+ |||||||
| 8.7.0+ |||||||
| 8.5.0+ |||||||
| 8.4.0+ |||||||
| 8.0.0+ |||||||
| 7.3.0+ |||||||

如果在 `flutter pub get` 时遇到了 `resolve conflict` 失败问题,
请使用 `dependency_overrides` 解决。

## 主要使用的 package

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

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

## 准备工作 🍭

### 版本兼容

该插件仅保证能与 **stable 渠道的 Flutter SDK** 配合使用。
我们不会为其他渠道的 Flutter SDK 做实时支持。

| | 3.0 | 3.3 | 3.7 | 3.10 | **3.13** |
|--------|:---:|:---:|:---:|:----:|:--------:|
| 8.7.0+ ||||||
| 8.5.0+ ||||||
| 8.4.0+ ||||||
| 8.0.0+ ||||||
| 7.3.0+ ||||||

如果在 `flutter pub get` 时遇到了 `resolve conflict` 失败问题,
请使用 `dependency_overrides` 解决。

### Flutter

执行 `flutter pub add wechat_assets_picker`
Expand Down
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ The package is a standalone extension that can to be used with combination.

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

## Versions compatibility

The package only guarantees to be working on **the stable version of Flutter**.
We won't update it in real-time to align with other channels of Flutter.

| | 3.0 | 3.3 | 3.7 | 3.10 | 3.13 | 3.16 |
|--------|:---:|:---:|:---:|:----:|:----:|:----:|
| 8.7.0+ |||||||
| 8.7.0+ |||||||
| 8.5.0+ |||||||
| 8.4.0+ |||||||
| 8.0.0+ |||||||
| 7.3.0+ |||||||

If you got a `resolve conflict` error when running `flutter pub get`,
please use `dependency_overrides` to fix it.

## Package credits

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

<!-- TOC -->
* [Flutter WeChat Assets Picker](#flutter-wechat-assets-picker)
* [Versions compatibility](#versions-compatibility)
* [Package credits](#package-credits)
* [Features ✨](#features-)
* [Notes 📝](#notes-)
* [Projects using this plugin 🖼️](#projects-using-this-plugin-)
* [Screenshots 📸](#screenshots-)
* [READ THIS FIRST ‼️](#read-this-first-)
* [Preparing for use 🍭](#preparing-for-use-)
* [Versions compatibility](#versions-compatibility)
* [Flutter](#flutter)
* [Android](#android)
* [Permissions](#permissions)
Expand Down Expand Up @@ -147,22 +164,6 @@ before you have any questions.

## Preparing for use 🍭

### Versions compatibility

The package only guarantees to be working on **the stable version of Flutter**.
We won't update it in real-time to align with other channels of Flutter.

| | 3.0 | 3.3 | 3.7 | 3.10 | **3.13** |
|--------|:---:|:---:|:---:|:----:|:--------:|
| 8.7.0+ ||||||
| 8.5.0+ ||||||
| 8.4.0+ ||||||
| 8.0.0+ ||||||
| 7.3.0+ ||||||

If you got a `resolve conflict` error when running `flutter pub get`,
please use `dependency_overrides` to fix it.

### Flutter

Run `flutter pub add wechat_assets_picker`,
Expand Down
1 change: 1 addition & 0 deletions lib/src/delegates/asset_picker_builder_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart';
import 'package:photo_manager/photo_manager.dart';
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
import 'package:provider/provider.dart';

import '../constants/constants.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart';
import 'package:photo_manager/photo_manager.dart';
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
import 'package:provider/provider.dart';

import '../constants/custom_scroll_physics.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widget/builder/asset_entity_grid_item_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import 'package:extended_image/extended_image.dart';
import 'package:flutter/material.dart';
import 'package:photo_manager/photo_manager.dart';
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';

import '../../internal/singleton.dart';
import '../../widget/scale_text.dart';
Expand Down
1 change: 1 addition & 0 deletions lib/src/widget/builder/image_page_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:extended_image/extended_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:photo_manager/photo_manager.dart';
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
import 'package:video_player/video_player.dart';

import '../../delegates/asset_picker_viewer_builder_delegate.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/widget/gaps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class SliverGap extends StatelessWidget {
Widget build(BuildContext context) {
Widget child;
if (_width != null) {
child = Gap.h(_width!, height: _height, color: color);
child = Gap.h(_width, height: _height, color: color);
} else if (_height != null) {
child = Gap.v(_height!, width: _width, color: color);
child = Gap.v(_height, width: _width, color: color);
} else {
child = const SizedBox.shrink();
}
Expand Down
8 changes: 4 additions & 4 deletions lib/src/widget/scale_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ class ScaleText extends StatelessWidget {
@override
Widget build(BuildContext context) {
final MediaQueryData mqd = MediaQuery.of(context);
final double effectiveFactor = mqd.textScaleFactor.clamp(
minScaleFactor,
maxScaleFactor,
final effectiveScaler = mqd.textScaler.clamp(
minScaleFactor: minScaleFactor,
maxScaleFactor: maxScaleFactor,
);
return MediaQuery(
data: mqd.copyWith(textScaleFactor: effectiveFactor),
data: mqd.copyWith(textScaler: effectiveScaler),
child: Text(
text,
style: style,
Expand Down
1 change: 1 addition & 0 deletions lib/wechat_assets_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
library wechat_assets_picker;

export 'package:photo_manager/photo_manager.dart';
export 'package:photo_manager_image_provider/photo_manager_image_provider.dart';

export 'src/constants/config.dart';
export 'src/constants/constants.dart' hide packageName;
Expand Down
9 changes: 5 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wechat_assets_picker
version: 8.8.0
version: 8.9.0-dev.1
description: |
An image picker (also with videos and audio)
for Flutter projects based on WeChat's UI,
Expand All @@ -15,15 +15,16 @@ repository: https://github.com/fluttercandies/flutter_wechat_assets_picker
issue_tracker: https://github.com/fluttercandies/flutter_wechat_assets_picker/issues

environment:
sdk: ^3.1.0
flutter: '>=3.13.0'
sdk: ^3.2.0
flutter: '>=3.16.0'

dependencies:
flutter:
sdk: flutter

extended_image: ^8.1.0
photo_manager: ^2.7.0
photo_manager: ^3.0.0-dev.1
photo_manager_image_provider: ^2.0.0
provider: ^6.0.5
video_player: ^2.7.0

Expand Down

0 comments on commit bf5daf2

Please sign in to comment.