Skip to content

Commit cdfb94c

Browse files
authored
Add an section explaining the benefits of using package:ok_http. (dart-lang#1252)
1 parent 8d89385 commit cdfb94c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pkgs/ok_http/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
An Android Flutter plugin that provides access to the
55
[OkHttp][] HTTP client.
66

7+
## Why use `package:ok_http`?
8+
9+
### 👍 Increased compatibility and reduced disk profile
10+
11+
`package:ok_http` is smaller and works on more devices than other packages.
12+
13+
This size of the [example application][] APK file using different packages:
14+
15+
| Package | APK Size (MiB) |
16+
|-|-|
17+
| **`ok_http`** | **20.3** |
18+
| [`cronet_http`](https://pub.dev/packages/cronet_http) [^1] | 20.6 |
19+
| [`cronet_http` (embedded)](https://pub.dev/packages/cronet_http#use-embedded-cronet) [^2] | 34.4 |
20+
| `dart:io` [^3] | 20.4 |
21+
22+
[^1]: Requires [Google Play Services][], which are not available on all devices.
23+
[^2]: Embeds the Cronet HTTP library.
24+
[^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html).
25+
726
## Status: experimental
827

928
**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
1938
feedback, suggestions, and comments, please file an issue in the
2039
[bug tracker](https://github.com/dart-lang/http/issues).
2140

41+
[example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example
2242
[OkHttp]: https://square.github.io/okhttp/
43+
[Google Play Services]: https://developers.google.com/android/guides/overview

0 commit comments

Comments
 (0)