Skip to content

Commit

Permalink
Add an section explaining the benefits of using package:ok_http. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan authored Jul 1, 2024
1 parent 8d89385 commit cdfb94c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkgs/ok_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit cdfb94c

Please sign in to comment.