From 9f773fc9e8b51f34c0918e7a5bd918e595a9b327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Mon, 23 Oct 2023 14:56:38 +0200 Subject: [PATCH] Fix lint issues (#2006) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix lint issues from https://github.com/cfug/dio/actions/runs/6599112276/job/17927803638?pr=2005 --------- Signed-off-by: Jonas Uekötter Co-authored-by: Alex Li --- .github/workflows/tests.yml | 2 +- dio/lib/src/compute/compute.dart | 38 +++++++++---------- dio/lib/src/compute/compute_io.dart | 32 ++++++++-------- dio/lib/src/compute/compute_web.dart | 32 ++++++++-------- plugins/native_dio_adapter/CHANGELOG.md | 2 + .../native_dio_adapter/example/pubspec.yaml | 4 +- plugins/native_dio_adapter/pubspec.yaml | 4 +- 7 files changed, 58 insertions(+), 56 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a72dbe28..b7170deaf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -144,6 +144,6 @@ jobs: uses: subosito/flutter-action@v2.8.0 with: cache: true - flutter-version: ${{ matrix.channel == 'min' && '3.10.0' || '' }} + flutter-version: ${{ matrix.channel == 'min' && '3.13.0' || '' }} channel: ${{ matrix.channel == 'min' && 'stable' || matrix.channel }} - run: flutter test diff --git a/dio/lib/src/compute/compute.dart b/dio/lib/src/compute/compute.dart index c7389a16a..a1c1aef4d 100644 --- a/dio/lib/src/compute/compute.dart +++ b/dio/lib/src/compute/compute.dart @@ -2,25 +2,25 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/// This file corresponds to Flutter's -/// [`foundation/isolates.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/isolates.dart). -/// -/// Changes are only synced with the `stable` branch. -/// -/// Last synced commit: -/// [3d46ab9](https://github.com/flutter/flutter/commit/3d46ab920b47a2ecb250c6f890f3559ef913cb0b) -/// -/// The changes are currently manually synced. If you noticed that the Flutter's -/// original `compute` function (and any of the related files) have changed -/// on the `stable` branch and you would like to see those changes in the `compute` package -/// please open an [issue](https://github.com/dartsidedev/compute/issues), -/// and I'll try my best to "merge". -/// -/// The file is intentionally not refactored so that it is easier to keep the -/// compute package up to date with Flutter's implementation. -/// -/// When this library supports just Dart 3, we can delete most of this code -/// an make use of `Isolate.run()` +// This file corresponds to Flutter's +// [`foundation/isolates.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/isolates.dart). +// +// Changes are only synced with the `stable` branch. +// +// Last synced commit: +// [3d46ab9](https://github.com/flutter/flutter/commit/3d46ab920b47a2ecb250c6f890f3559ef913cb0b) +// +// The changes are currently manually synced. If you noticed that the Flutter's +// original `compute` function (and any of the related files) have changed +// on the `stable` branch and you would like to see those changes in the `compute` package +// please open an [issue](https://github.com/dartsidedev/compute/issues), +// and I'll try my best to "merge". +// +// The file is intentionally not refactored so that it is easier to keep the +// compute package up to date with Flutter's implementation. +// +// When this library supports just Dart 3, we can delete most of this code +// an make use of `Isolate.run()` // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async'; diff --git a/dio/lib/src/compute/compute_io.dart b/dio/lib/src/compute/compute_io.dart index f45646bfe..6bf0a53d8 100644 --- a/dio/lib/src/compute/compute_io.dart +++ b/dio/lib/src/compute/compute_io.dart @@ -2,22 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/// This file corresponds to Flutter's -/// [`foundation/_isolates_io.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_io.dart). -/// -/// Changes are only synced with the `stable` branch. -/// -/// Last synced commit: -/// [3420b9c](https://github.com/flutter/flutter/commit/3420b9c50ea19489dd74b024705bb010c5763d0a) -/// -/// The changes are currently manually synced. If you noticed that the Flutter's -/// original `compute` function (and any of the related files) have changed -/// on the `stable` branch and you would like to see those changes in the `compute` package -/// please open an [issue](https://github.com/dartsidedev/compute/issues), -/// and I'll try my best to "merge". -/// -/// The file is intentionally not refactored so that it is easier to keep the -/// compute package up to date with Flutter's implementation. +// This file corresponds to Flutter's +// [`foundation/_isolates_io.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_io.dart). +// +// Changes are only synced with the `stable` branch. +// +// Last synced commit: +// [3420b9c](https://github.com/flutter/flutter/commit/3420b9c50ea19489dd74b024705bb010c5763d0a) +// +// The changes are currently manually synced. If you noticed that the Flutter's +// original `compute` function (and any of the related files) have changed +// on the `stable` branch and you would like to see those changes in the `compute` package +// please open an [issue](https://github.com/dartsidedev/compute/issues), +// and I'll try my best to "merge". +// +// The file is intentionally not refactored so that it is easier to keep the +// compute package up to date with Flutter's implementation. import 'dart:async'; import 'dart:developer'; import 'dart:isolate'; diff --git a/dio/lib/src/compute/compute_web.dart b/dio/lib/src/compute/compute_web.dart index b651b056a..db6bc5369 100644 --- a/dio/lib/src/compute/compute_web.dart +++ b/dio/lib/src/compute/compute_web.dart @@ -2,22 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/// This file corresponds to Flutter's -/// [`foundation/_isolates_web.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_web.dart). -/// -/// Changes are only synced with the `stable` branch. -/// -/// Last synced commit: -/// [978a2e7](https://github.com/flutter/flutter/commit/978a2e7bf6a2ed287130af8dbd94cef019fb7bef) -/// -/// The changes are currently manually synced. If you noticed that the Flutter's -/// original `compute` function (and any of the related files) have changed -/// on the `stable` branch and you would like to see those changes in the `compute` package -/// please open an [issue](https://github.com/dartsidedev/compute/issues), -/// and I'll try my best to "merge". -/// -/// The file is intentionally not refactored so that it is easier to keep the -/// compute package up to date with Flutter's implementation. +// This file corresponds to Flutter's +// [`foundation/_isolates_web.dart`](https://github.com/flutter/flutter/blob/stable/packages/flutter/lib/src/foundation/_isolates_web.dart). +// +// Changes are only synced with the `stable` branch. +// +// Last synced commit: +// [978a2e7](https://github.com/flutter/flutter/commit/978a2e7bf6a2ed287130af8dbd94cef019fb7bef) +// +// The changes are currently manually synced. If you noticed that the Flutter's +// original `compute` function (and any of the related files) have changed +// on the `stable` branch and you would like to see those changes in the `compute` package +// please open an [issue](https://github.com/dartsidedev/compute/issues), +// and I'll try my best to "merge". +// +// The file is intentionally not refactored so that it is easier to keep the +// compute package up to date with Flutter's implementation. import 'compute.dart' as c; /// The dart:html implementation of [c.compute]. diff --git a/plugins/native_dio_adapter/CHANGELOG.md b/plugins/native_dio_adapter/CHANGELOG.md index 48983e7f5..686d4f770 100644 --- a/plugins/native_dio_adapter/CHANGELOG.md +++ b/plugins/native_dio_adapter/CHANGELOG.md @@ -3,6 +3,8 @@ ## Unreleased - Bump `cronet_http` version. +- Minimal required Dart version is now 3.1. +- Minimal required Flutter version is now 3.13.0. ## 1.0.0+2 diff --git a/plugins/native_dio_adapter/example/pubspec.yaml b/plugins/native_dio_adapter/example/pubspec.yaml index 63093df21..9b5171997 100644 --- a/plugins/native_dio_adapter/example/pubspec.yaml +++ b/plugins/native_dio_adapter/example/pubspec.yaml @@ -4,13 +4,13 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: '>=2.18.0 <3.0.0' + sdk: '>=3.1.0 <4.0.0' dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 - dio: ^5.0.0-0 + dio: ^5.0.0 native_dio_adapter: path: ../ diff --git a/plugins/native_dio_adapter/pubspec.yaml b/plugins/native_dio_adapter/pubspec.yaml index 8e9745136..e16709508 100644 --- a/plugins/native_dio_adapter/pubspec.yaml +++ b/plugins/native_dio_adapter/pubspec.yaml @@ -13,8 +13,8 @@ repository: https://github.com/cfug/dio/blob/main/plugins/native_dio_adapter issue_tracker: https://github.com/cfug/dio/issues environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.10.0" + sdk: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" dependencies: dio: ^5.2.0