diff --git a/dio/README-ZH.md b/dio/README-ZH.md index c1cb7e18f..3f4315770 100644 --- a/dio/README-ZH.md +++ b/dio/README-ZH.md @@ -54,21 +54,7 @@ dio 是一个强大的 HTTP 网络请求库,支持全局配置、Restful API ### 添加依赖 -你可以使用以下命令将 dio 的最新稳定版依赖添加至你的项目: - -```console -$ dart pub add dio -``` - -你也可以手动将 dio 添加至 pubspec.yaml: - -```yaml -dependencies: - dio: ^替换为最新版本 -``` - -最新稳定版本为:![Pub](https://img.shields.io/pub/v/dio.svg) -最新包含开发版的版本为:![Pub](https://img.shields.io/pub/v/dio?include_prereleases) +依照文档将 `dio` 包添加为 [pubspec 的依赖](https://pub.flutter-io.cn/packages/dio/install)。 **在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。
请阅读 [迁移指南][] 了解完整的重大变更内容。** diff --git a/dio/README.md b/dio/README.md index 3786e0045..38133b185 100644 --- a/dio/README.md +++ b/dio/README.md @@ -54,23 +54,10 @@ Timeout, Custom adapters, Transformers, etc. ## Get started -### Add dependency +### Install -You can use the command to add dio as a dependency with the latest stable version: +Add the `dio` package to your [pubspec dependencies](https://pub.dev/packages/dio/install). -```console -$ dart pub add dio -``` - -Or you can manually add dio into the dependencies section in your pubspec.yaml: - -```yaml -dependencies: - dio: ^replace-with-latest-version -``` - -The latest version is: ![Pub](https://img.shields.io/pub/v/dio.svg) -The latest version including pre-releases is: ![Pub](https://img.shields.io/pub/v/dio?include_prereleases) **Before you upgrade: Breaking changes might happen in major and minor versions of packages.
See the [Migration Guide][] for the complete breaking changes list.** diff --git a/plugins/cookie_manager/README.md b/plugins/cookie_manager/README.md index a4c156927..043dabd9c 100644 --- a/plugins/cookie_manager/README.md +++ b/plugins/cookie_manager/README.md @@ -8,10 +8,7 @@ A cookie manager combines cookie_jar and dio, based on the interceptor algorithm ### Install -```yaml -dependencies: - dio_cookie_manager: ^latest-version -``` +Add the `dio_cookie_manager` package to your [pubspec dependencies](https://pub.dev/packages/dio_cookie_manager/install). ### Usage diff --git a/plugins/http2_adapter/README.md b/plugins/http2_adapter/README.md index 65224b611..79448f6b2 100644 --- a/plugins/http2_adapter/README.md +++ b/plugins/http2_adapter/README.md @@ -8,10 +8,7 @@ An adapter that combines HTTP/2 and dio. Supports reusing connections, header co ### Install -```yaml -dependencies: - dio_http2_adapter: ^2.0.0 # latest version -``` +Add the `dio_http2_adapter` package to your [pubspec dependencies](https://pub.dev/packages/dio_http2_adapter/install). ### Usage diff --git a/plugins/native_dio_adapter/README.md b/plugins/native_dio_adapter/README.md index f7ce819f4..774e12c6f 100644 --- a/plugins/native_dio_adapter/README.md +++ b/plugins/native_dio_adapter/README.md @@ -17,7 +17,7 @@ to delegate HTTP requests to the native platform instead of the `dart:io` platfo Inspired by the [Dart 2.18 release blog](https://medium.com/dartlang/dart-2-18-f4b3101f146c). -# Motivation +## Motivation Using the native platform implementation, rather than the socket-based [`dart:io` HttpClient](https://api.dart.dev/stable/dart-io/HttpClient-class.html) implementation, has several advantages: @@ -25,7 +25,13 @@ Using the native platform implementation, rather than the socket-based [`dart:io - It supports many more configuration options such as only allowing access through WiFi and blocking cookies. - It supports more HTTP features such as HTTP/3 and custom redirect handling. -# Example +## Get started + +### Install + +Add the `native_dio_adapter` package to your [pubspec dependencies](https://pub.dev/packages/native_dio_adapter/install). + +### Example ```dart final dioClient = Dio();