Skip to content

Commit

Permalink
upgrade dependencies, now minimal flutter sdk version is v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bachue committed Jul 2, 2024
1 parent d2d621a commit 6fab6a6
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [2.18, 2.19, 3.0, 3.1, 3.2, 3.3, 3.4, stable]
sdk: [3.0, 3.1, 3.2, 3.3, 3.4, stable]
defaults:
run:
working-directory: ./base
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on: [push, pull_request]
jobs:
flutter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter_version: ['2.8.x', '2.10.x', '3.0.x', '3.3.x', '3.7.x', '3.10.x', '3.13.x', '3.16.x', '3.19.x', '3.22.x']
defaults:
run:
working-directory: ./flutter
Expand All @@ -17,7 +21,8 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.0'
channel: stable
flutter-version: ${{ matrix.flutter_version }}

- run: flutter pub get
- run: flutter test
4 changes: 4 additions & 0 deletions base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.3

- 更新 uuid 到最新版本,对 Flutter SDK 的最低版本要求提升到 3.0

## 0.5.2

- 添加上传时的 mimetype 支持(仅分片上传支持)
Expand Down
6 changes: 3 additions & 3 deletions base/lib/src/storage/error/error.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class StorageError extends QiniuError {
StorageError({
required this.type,
this.code,
dynamic rawError,
String? message,
}) : super(rawError: rawError, message: message);
super.rawError,
super.message,
});

factory StorageError.fromError(Error error) {
return StorageError(
Expand Down
9 changes: 4 additions & 5 deletions base/lib/src/storage/resource/bytes_resource.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ class BytesResource extends Resource {
final String id;
BytesResource({
required this.bytes,
required int length,
String? name,
int? partSize,
}) : id = md5.convert(bytes).toString(),
super(name: name, length: length, partSize: partSize);
required super.length,
super.name,
super.partSize,
}) : id = md5.convert(bytes).toString();

late StreamController<List<int>> _controller;

Expand Down
9 changes: 4 additions & 5 deletions base/lib/src/storage/resource/file_resource.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ class FileResource extends Resource {
final String id;
FileResource({
required this.file,
required int length,
String? name,
int? partSize,
}) : id = 'path_${file.path}_size_${file.lengthSync()}',
super(name: name, length: length, partSize: partSize);
required super.length,
super.name,
super.partSize,
}) : id = 'path_${file.path}_size_${file.lengthSync()}';

late StreamController<List<int>> _controller;

Expand Down
8 changes: 4 additions & 4 deletions base/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: qiniu_sdk_base
version: 0.5.2
version: 0.5.3
homepage: https://github.com/qiniu/dart-sdk
description: The sdk basic of Qiniu products

false_secrets:
- /test/auth/auth_test.dart

environment:
sdk: '>=2.15.0 <4.0.0'
sdk: '>=3.0.0 <4.0.0'

dependencies:
dio: ^5.0.0
crypto: ^3.0.0
meta: ^1.3.0
uuid: ^3.0.5
meta: ^1.10.0
uuid: ^4.4.0
path: ^1.8.0

dev_dependencies:
Expand Down
5 changes: 3 additions & 2 deletions flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependency_overrides:
dependency_overrides:
qiniu_sdk_base:
path: ../../base/

dependencies:
flutter:
sdk: flutter
meta: ^1.10.0
file_picker: ^3.0.1
qiniu_flutter_sdk:
path: ../
Expand Down
3 changes: 2 additions & 1 deletion flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ version: 0.5.0
homepage: https://github.com/qiniu/dart-sdk/tree/master/flutter

environment:
sdk: ">=2.15.0 <4.0.0"
sdk: ">=3.0.0 <4.0.0"
flutter: ">=2.8.0"

dependencies:
flutter:
sdk: flutter
meta: ^1.10.0
dio: ^5.0.0
qiniu_sdk_base: ^0.5.0

Expand Down

0 comments on commit 6fab6a6

Please sign in to comment.