From 37fceb8166bade3e7c5175faf77854b50e3f48ae Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Feb 2024 16:30:02 -0800 Subject: [PATCH] Fix incorrect documentation that used the old `isOwned` name (#1140) --- pkgs/cronet_http/CHANGELOG.md | 2 ++ pkgs/cronet_http/README.md | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 30979ca249..28d41376b4 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.2.0-wip * Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`. +* Fix a bug in the documentation where `isOwned` is used rather than + `closeEngine`. ## 1.1.1 diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index e1ff6d2f15..321897aa21 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -38,11 +38,10 @@ void main() async { final Client httpClient; if (Platform.isAndroid) { final engine = CronetEngine.build( - cacheMode: CacheMode.memory, - cacheMaxSize: 2 * 1024 * 1024, - userAgent: 'Book Agent', - ); - httpClient = CronetClient.fromCronetEngine(engine, isOwned: true); + cacheMode: CacheMode.memory, + cacheMaxSize: 2 * 1024 * 1024, + userAgent: 'Book Agent'); + httpClient = CronetClient.fromCronetEngine(engine, closeEngine: true); } else { httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); }