From 8b3de7d41441b6bd11513d98da63070ec5bd6163 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Nov 2023 13:01:56 -0700 Subject: [PATCH 1/2] Fix use of obsolete CronetClient() constructor --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ pkgs/cronet_http/lib/cronet_http.dart | 2 +- pkgs/cronet_http/lib/src/cronet_client.dart | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 6d230165b7..e415bf641f 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.1 + +* Fix obsolete `CronetClient()` constructor usage. + ## 0.4.0 * Use more efficient operations when copying bytes between Java and Dart. diff --git a/pkgs/cronet_http/lib/cronet_http.dart b/pkgs/cronet_http/lib/cronet_http.dart index e41af71f9e..fe6499fc6d 100644 --- a/pkgs/cronet_http/lib/cronet_http.dart +++ b/pkgs/cronet_http/lib/cronet_http.dart @@ -10,7 +10,7 @@ /// import 'package:cronet_http/cronet_http.dart'; /// /// void main() async { -/// var client = CronetClient(); +/// var client = CronetClient.defaultCronetEngine(); /// final response = await client.get( /// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); /// if (response.statusCode != 200) { diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 69143208fc..c4d0d19006 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -235,7 +235,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( /// For example: /// ``` /// void main() async { -/// var client = CronetClient(); +/// var client = CronetClient.defaultCronetEngine(); /// final response = await client.get( /// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); /// if (response.statusCode != 200) { From 96f0e712aa540ea1b9e76d638c0d6653239d7596 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Nov 2023 13:02:22 -0700 Subject: [PATCH 2/2] Update pubspec.yaml --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 37ba7afcbd..70d56f7788 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.0 +version: 0.4.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: