From 91ca772b98796db41cfb9f1a1a9097d50ff9ff9e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 1 Jul 2024 12:53:40 -0700 Subject: [PATCH 1/2] Add an section explaining the benefits of using `package:ok_http`. --- pkgs/ok_http/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index cca48a3079..5474180482 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -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 @@ -20,3 +39,4 @@ feedback, suggestions, and comments, please file an issue in the [bug tracker](https://github.com/dart-lang/http/issues). [OkHttp]: https://square.github.io/okhttp/ +[Google Play Services]: https://developers.google.com/android/guides/overview From c230807098e4f1cdbc1b56097052722ec455c9d6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 1 Jul 2024 13:44:38 -0700 Subject: [PATCH 2/2] Fix broken link --- pkgs/ok_http/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index 5474180482..6c21d824e7 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -10,7 +10,7 @@ An Android Flutter plugin that provides access to the `package:ok_http` is smaller and works on more devices than other packages. -This size of the [example application]() APK file using different packages: +This size of the [example application][] APK file using different packages: | Package | APK Size (MiB) | |-|-| @@ -38,5 +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