From 3c14e5dd712e7d55a1cb054e5a6fe8bcbbfe1ee7 Mon Sep 17 00:00:00 2001 From: Anikate-De Date: Sun, 7 Jul 2024 11:59:39 +0530 Subject: [PATCH] Squashed commit of the following: commit 4178b67e7970ff02926e79649db5ab473b46cf30 Author: Brian Quinlan Date: Wed Jul 3 17:16:38 2024 -0700 Clarify when Client.close must be called (#1255) commit 719dc5f43e3d81ed24f499f122b58be2eb933b4c Author: Brian Quinlan Date: Tue Jul 2 11:18:29 2024 -0700 Upgrade to http_image_provider: 0.0.3 (#1253) commit 75b1efb125c6433f6efcb68e6a1509883ab276a2 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jul 2 10:46:54 2024 -0700 Bump the github-actions group across 1 directory with 4 updates (#1251) Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [subosito/flutter-action](https://github.com/subosito/flutter-action), [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.1 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/b4ffde65f46336ab88eb53be808477a3936bae11...692973e3d937129bcbf40652eb9f2f61becf3332) Updates `subosito/flutter-action` from 2.12.0 to 2.16.0 - [Release notes](https://github.com/subosito/flutter-action/releases) - [Commits](https://github.com/subosito/flutter-action/compare/2783a3f08e1baf891508463f8c6653c258246225...44ac965b96f18d999802d4b807e3256d5a3f9fa1) Updates `reactivecircus/android-emulator-runner` from 2.30.1 to 2.31.0 - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](https://github.com/reactivecircus/android-emulator-runner/compare/6b0df4b0efb23bb0ec63d881db79aefbc976e4b2...77986be26589807b8ebab3fde7bbf5c60dabec32) Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5 - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/f0ead981b4d9a35b37f30d36160575d60931ec30...0a8a0fc875eb934c15d08629302413c671d3f672) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: subosito/flutter-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit cdfb94caada17fbe7fbe7246fa29e43a029ff4b1 Author: Brian Quinlan Date: Mon Jul 1 14:16:10 2024 -0700 Add an section explaining the benefits of using `package:ok_http`. (#1252) --- .github/workflows/cronet.yml | 6 +- .github/workflows/cupertino.yml | 4 +- .github/workflows/dart.yml | 96 +++++++++++------------ .github/workflows/java.yml | 4 +- .github/workflows/okhttp.yaml | 6 +- pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/flutter_http_example/lib/main.dart | 2 +- pkgs/flutter_http_example/pubspec.yaml | 2 +- pkgs/http/lib/src/client.dart | 7 +- pkgs/ok_http/README.md | 21 +++++ pkgs/ok_http/example/lib/main.dart | 2 +- pkgs/ok_http/example/pubspec.yaml | 2 +- 15 files changed, 92 insertions(+), 68 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 40b51469be..c6ca3e47be 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -31,12 +31,12 @@ jobs: run: working-directory: pkgs/cronet_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' java-version: '17' - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install @@ -49,7 +49,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 + uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index b790193875..e701c73395 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -33,8 +33,8 @@ jobs: # version. flutter-version: ["3.22.0", "any"] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: flutter-version: ${{ matrix.flutter-version }} channel: 'stable' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a294017b2b..00a651ede0 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,12 +29,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: mono_repo self validate run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate @@ -54,12 +54,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.2.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -84,12 +84,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -132,12 +132,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -162,12 +162,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -228,12 +228,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -294,12 +294,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -324,12 +324,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -354,12 +354,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -393,12 +393,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -432,12 +432,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -471,12 +471,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -510,12 +510,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -549,12 +549,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -588,12 +588,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -627,12 +627,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -666,12 +666,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -714,12 +714,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -753,12 +753,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -792,12 +792,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -831,12 +831,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -870,12 +870,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -909,12 +909,12 @@ jobs: os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -938,12 +938,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index fd0afc9639..f9ae20d336 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -29,8 +29,8 @@ jobs: run: working-directory: pkgs/java_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index 6670fd2f8d..e20a039ce9 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -28,12 +28,12 @@ jobs: run: working-directory: pkgs/ok_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' java-version: '17' - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install @@ -46,7 +46,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 + uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 1af8e9203f..62990e337d 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -142,7 +142,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 5d94a3944e..a2ed4b03cb 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 24436ea052..78fcb9c8ad 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -141,7 +141,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index a57f39fd05..b074234bff 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 13d8bc24d8..899105b227 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -138,7 +138,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index b3b3ef50f7..272f50d854 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.0.5 dev_dependencies: diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index dace470a75..6de5698104 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -148,8 +148,11 @@ abstract interface class Client { /// Closes the client and cleans up any resources associated with it. /// - /// It's important to close each client when it's done being used; failing to - /// do so can cause the Dart process to hang. + /// Some clients maintain a pool of network connections that will not be + /// disconnected until the client is closed. This may cause programs using + /// using the Dart SDK (`dart run`, `dart test`, `dart compile`, etc.) to + /// not terminate until the client is closed. Programs run using the Flutter + /// SDK can still terminate even with an active connection pool. /// /// Once [close] is called, no other methods should be called. If [close] is /// called while other asynchronous methods are running, the behavior is diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index cca48a3079..6c21d824e7 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -4,6 +4,25 @@ An Android Flutter plugin that provides access to the [OkHttp][] HTTP client. +## Why use `package:ok_http`? + +### 👍 Increased compatibility and reduced disk profile + +`package:ok_http` is smaller and works on more devices than other packages. + +This size of the [example application][] APK file using different packages: + +| Package | APK Size (MiB) | +|-|-| +| **`ok_http`** | **20.3** | +| [`cronet_http`](https://pub.dev/packages/cronet_http) [^1] | 20.6 | +| [`cronet_http` (embedded)](https://pub.dev/packages/cronet_http#use-embedded-cronet) [^2] | 34.4 | +| `dart:io` [^3] | 20.4 | + +[^1]: Requires [Google Play Services][], which are not available on all devices. +[^2]: Embeds the Cronet HTTP library. +[^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html). + ## Status: experimental **NOTE**: This package is currently experimental and published under the @@ -19,4 +38,6 @@ Your feedback is valuable and will help us evolve this package. For general feedback, suggestions, and comments, please file an issue in the [bug tracker](https://github.com/dart-lang/http/issues). +[example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example [OkHttp]: https://square.github.io/okhttp/ +[Google Play Services]: https://developers.google.com/android/guides/overview diff --git a/pkgs/ok_http/example/lib/main.dart b/pkgs/ok_http/example/lib/main.dart index a291743be9..871779eed0 100644 --- a/pkgs/ok_http/example/lib/main.dart +++ b/pkgs/ok_http/example/lib/main.dart @@ -177,7 +177,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index ea64ed0ae8..8a394364fe 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 ok_http: path: ../ provider: ^6.1.1