Skip to content

Commit 5c72bb7

Browse files
authored
🚀 Migrate to Flutter 3.10 (#443)
1 parent 9472521 commit 5c72bb7

File tree

10 files changed

+45
-38
lines changed

10 files changed

+45
-38
lines changed

CHANGELOG.md

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

55
# Changelog
66

7+
## 8.5.0
8+
9+
### Breaking changes
10+
11+
- Migrate to Flutter 3.10, drop supports for previous Flutter versions.
12+
713
## 8.4.3
814

915
### New features

README-ZH.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Language: [English](README.md) | 中文
6060
* [使用 `diox`](#使用-diox)
6161
* [自定义选择器](#自定义选择器)
6262
* [常见问题 ❔](#常见问题-)
63-
* [Execution failed for task ':photo_manager:compileDebugKotlin'](#execution-failed-for-task---photomanager--compiledebugkotlin)
63+
* [Execution failed for task ':photo_manager:compileDebugKotlin'](#execution-failed-for-task-photomanagercompiledebugkotlin)
6464
* [`File``Uint8List` 创建 `AssetEntity` 的方法](#从-file-或-uint8list-创建-assetentity-的方法)
65-
* [控制台提示 'Failed to find GeneratedAppGlideModule'](#控制台提示--failed-to-find-generatedappglidemodule)
65+
* [控制台提示 'Failed to find GeneratedAppGlideModule'](#控制台提示-failed-to-find-generatedappglidemodule)
6666
* [致谢](#致谢)
6767
<!-- TOC -->
6868
</details>
@@ -129,12 +129,12 @@ Language: [English](README.md) | 中文
129129

130130
### 版本兼容
131131

132-
| | 2.10.0 | 3.0.0 | 3.3.0 | 3.7.0 |
133-
|--------|:------:|:-----:|:-----:|:-----:|
134-
| 8.4.0+ | ||||
135-
| 8.0.0+ | | |||
136-
| 7.3.0+ | || ||
137-
| 7.0.0+ | | |||
132+
| | 3.0.0 | 3.3.0 | 3.7.0 | 3.10.0 |
133+
|--------|:-----:|:-----:|:-----:|:------:|
134+
| 8.5.0+ |||| |
135+
| 8.4.0+ || || |
136+
| 8.0.0+ | || | |
137+
| 7.3.0+ || || |
138138

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

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ See the [Migration Guide][] to learn how to migrate between breaking changes.
6363
* [With `diox`](#with-diox)
6464
* [Custom pickers](#custom-pickers)
6565
* [Frequently asked question ❔](#frequently-asked-question-)
66-
* [Execution failed for task ':photo_manager:compileDebugKotlin'](#execution-failed-for-task---photomanager--compiledebugkotlin)
67-
* [Create `AssetEntity` from `File` or `Uint8List` (rawData)](#create-assetentity-from-file-or-uint8list--rawdata-)
68-
* [Glide warning 'Failed to find GeneratedAppGlideModule'](#glide-warning--failed-to-find-generatedappglidemodule)
66+
* [Execution failed for task ':photo_manager:compileDebugKotlin'](#execution-failed-for-task-photomanagercompiledebugkotlin)
67+
* [Create `AssetEntity` from `File` or `Uint8List` (rawData)](#create-assetentity-from-file-or-uint8list-rawdata)
68+
* [Glide warning 'Failed to find GeneratedAppGlideModule'](#glide-warning-failed-to-find-generatedappglidemodule)
6969
* [Contributors ✨](#contributors-)
7070
* [Credits](#credits)
7171
<!-- TOC -->
@@ -136,12 +136,12 @@ before you have any questions.
136136

137137
### Versions compatibility
138138

139-
| | 2.10.0 | 3.0.0 | 3.3.0 | 3.7.0 |
140-
|--------|:------:|:-----:|:-----:|:-----:|
141-
| 8.4.0+ | ||||
142-
| 8.0.0+ | | |||
143-
| 7.3.0+ | || ||
144-
| 7.0.0+ | | |||
139+
| | 3.0.0 | 3.3.0 | 3.7.0 | 3.10.0 |
140+
|--------|:-----:|:-----:|:-----:|:------:|
141+
| 8.5.0+ |||| |
142+
| 8.4.0+ || || |
143+
| 8.0.0+ | || | |
144+
| 7.3.0+ || || |
145145

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

analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ linter:
138138
# - prefer_constructors_over_static_methods # far too many false positives
139139
- prefer_contains
140140
# - prefer_double_quotes # opposite of prefer_single_quotes
141-
- prefer_equal_for_default_values
142141
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
143142
- prefer_final_fields
144143
- prefer_final_in_for_each

example/lib/constants/screens.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2019 The FlutterCandies author. All rights reserved.
22
// Use of this source code is governed by an Apache license that can be found
33
// in the LICENSE file.
4+
//ignore_for_file: deprecated_member_use
45

56
import 'dart:ui' as ui;
67

example/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version: 8.4.3+37
44
publish_to: none
55

66
environment:
7-
sdk: '>=2.17.0 <3.0.0'
8-
flutter: '>=3.0.0'
7+
sdk: '>=3.0.0 <4.0.0'
8+
flutter: '>=3.10.0'
99

1010
dependencies:
1111
flutter:
@@ -17,9 +17,9 @@ dependencies:
1717
path: ../
1818
wechat_camera_picker: ^3.6.0
1919

20-
package_info_plus: ^1.4.2
20+
package_info_plus: ^4.0.0
2121
path: ^1.8.0
22-
path_provider: ^2.0.8
22+
path_provider: ^2.0.15
2323
provider: ^6.0.2
2424

2525
flutter:

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,13 +1575,14 @@ class DefaultAssetPickerBuilderDelegate
15751575
builder: (_, bool isSwitchingPath, __) => Positioned.fill(
15761576
child: IgnorePointer(
15771577
ignoring: !isSwitchingPath,
1578-
ignoringSemantics: true,
1579-
child: GestureDetector(
1580-
onTap: () => this.isSwitchingPath.value = false,
1581-
child: AnimatedOpacity(
1582-
duration: switchingPathDuration,
1583-
opacity: isSwitchingPath ? .75 : 0,
1584-
child: const ColoredBox(color: Colors.black),
1578+
child: ExcludeSemantics(
1579+
child: GestureDetector(
1580+
onTap: () => this.isSwitchingPath.value = false,
1581+
child: AnimatedOpacity(
1582+
duration: switchingPathDuration,
1583+
opacity: isSwitchingPath ? .75 : 0,
1584+
child: const ColoredBox(color: Colors.black),
1585+
),
15851586
),
15861587
),
15871588
),

lib/src/delegates/asset_picker_text_delegate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class AssetPickerTextDelegate {
107107
const String separator = ':';
108108
final String minute = duration.inMinutes.toString().padLeft(2, '0');
109109
final String second =
110-
((duration - Duration(minutes: duration.inMinutes)).inSeconds)
110+
(duration - Duration(minutes: duration.inMinutes)).inSeconds
111111
.toString()
112112
.padLeft(2, '0');
113113
return '$minute$separator$second';

pubspec.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wechat_assets_picker
2-
version: 8.4.3
2+
version: 8.5.0
33
description: |
44
An image picker (also with videos and audio)
55
for Flutter projects based on WeChat's UI,
@@ -9,17 +9,17 @@ repository: https://github.com/fluttercandies/flutter_wechat_assets_picker
99
issue_tracker: https://github.com/fluttercandies/flutter_wechat_assets_picker/issues
1010

1111
environment:
12-
sdk: '>=2.19.0 <3.0.0'
13-
flutter: '>=3.7.0'
12+
sdk: '>=3.0.0 <4.0.0'
13+
flutter: '>=3.10.0'
1414

1515
dependencies:
1616
flutter:
1717
sdk: flutter
1818

19-
extended_image: ^7.0.0
19+
extended_image: ^8.0.0
2020
photo_manager: ^2.6.0
21-
provider: ^6.0.2
22-
video_player: ^2.4.0
21+
provider: ^6.0.5
22+
video_player: ^2.6.0
2323

2424
dev_dependencies:
2525
flutter_localizations:

test/widget_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void main() {
6767
onButtonPressed: (BuildContext context) {
6868
AssetPicker.pickAssets(
6969
context,
70-
pickerConfig: AssetPickerConfig(
70+
pickerConfig: const AssetPickerConfig(
7171
maxAssets: 2,
7272
specialPickerType: SpecialPickerType.noPreview,
7373
),
@@ -88,7 +88,7 @@ void main() {
8888
onButtonPressed: (BuildContext context) {
8989
AssetPicker.pickAssets(
9090
context,
91-
pickerConfig: AssetPickerConfig(
91+
pickerConfig: const AssetPickerConfig(
9292
maxAssets: 1,
9393
specialPickerType: SpecialPickerType.noPreview,
9494
),

0 commit comments

Comments
 (0)