Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the install section in READMEs with link to pub.dev/install #1962

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions dio/README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,7 @@ dio 是一个强大的 HTTP 网络请求库,支持全局配置、Restful API

### 添加依赖
AlexV525 marked this conversation as resolved.
Show resolved Hide resolved

你可以使用以下命令将 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)。

**在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。<br/>
请阅读 [迁移指南][] 了解完整的重大变更内容。**
Expand Down
17 changes: 2 additions & 15 deletions dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>
See the [Migration Guide][] for the complete breaking changes list.**
Expand Down
5 changes: 1 addition & 4 deletions plugins/cookie_manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions plugins/http2_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 8 additions & 2 deletions plugins/native_dio_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ 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:

- It automatically supports platform features such VPNs and HTTP proxies.
- 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();
Expand Down