Skip to content

Commit 37fceb8

Browse files
authored
Fix incorrect documentation that used the old isOwned name (#1140)
1 parent 6e0a46f commit 37fceb8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pkgs/cronet_http/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## 1.2.0-wip
22

33
* Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`.
4+
* Fix a bug in the documentation where `isOwned` is used rather than
5+
`closeEngine`.
46

57
## 1.1.1
68

pkgs/cronet_http/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ void main() async {
3838
final Client httpClient;
3939
if (Platform.isAndroid) {
4040
final engine = CronetEngine.build(
41-
cacheMode: CacheMode.memory,
42-
cacheMaxSize: 2 * 1024 * 1024,
43-
userAgent: 'Book Agent',
44-
);
45-
httpClient = CronetClient.fromCronetEngine(engine, isOwned: true);
41+
cacheMode: CacheMode.memory,
42+
cacheMaxSize: 2 * 1024 * 1024,
43+
userAgent: 'Book Agent');
44+
httpClient = CronetClient.fromCronetEngine(engine, closeEngine: true);
4645
} else {
4746
httpClient = IOClient(HttpClient()..userAgent = 'Book Agent');
4847
}

0 commit comments

Comments
 (0)