搜索插件、代码仓与 APP 分类

插件详情v1.8.0

native_dio_adapter

一个用于 dio 的客户端,利用 cupertino_http 和 cronet_http 将 HTTP 请求委托给原生平台。

AndroidiOSmacOSWindowsLinux
近 30 天下载
13.6万
喜欢数
68
Pub 分数
160

安装插件

flutter pub add native_dio_adapter

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Dio 插件,使用 cupertino_http 和 cronet_http 将 HTTP 请求委托给原生平台实现,从而在 Android、iOS、macOS、Windows 和 Linux 上提升性能和可靠性。它利用系统级网络栈以提高效率,并与平台特定功能保持兼容。适用于需要在多个平台上优化网络行为的应用。

适合场景

  • 高性能 HTTP 请求
  • 跨平台网络优化
  • 利用原生 HTTP 堆栈功能
  • 改进了移动和桌面端的请求处理
  • 与现有基于 Dio 的应用程序集成

主要特点

  • 使用原生 HTTP 实现
  • 支持 Android、iOS、macOS、Windows 和 Linux
  • 通过平台原生网络功能提升性能
  • 与 Dio 的无缝集成
  • 自动回退和平台特定路由

适合对象

  • 需要最佳网络性能的应用程序
  • 使用 Dio 进行 HTTP 操作的开发者
  • 针对多个平台的项目
  • 优先考虑原生网络功能的团队
  • 需要可靠且快速HTTP通信的应用程序

使用建议

  • 需要平台特定的设置才能实现完整功能
  • 由于原生依赖项,应用大小可能增加
  • 与纯 Dio 相比,自定义选项有限
  • 依赖外部原生库(cupertino_http,cronet_http)
  • 不适用于没有原生HTTP支持的环境

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

dio

Language: English | 简体中文

This is the base repo of the dio project. Please move to specific paths for project instructions.

Don't forget to add #dio topic to your published dio-related packages! See more: https://dart.dev/tools/pub/pubspec#topics

Versioning

Before you upgrade: Breaking changes might happen in major and minor versions of packages.
See the Migration Guide for the complete breaking changes list.

To know about our compatibility policy, see the Compatibility Policy doc.

All Packages

dio
Plugins
  • cookie_manager: link Pub
  • compatibility_layer: link Pub
  • http2_adapter: link Pub
  • native_dio_adapter: link Pub
  • web_adapter: link Pub
Examples
  • example: link
  • example_flutter_app: link

Copyright & License

The project and its underlying projects are originally authored by @wendux with the organization @flutterchina, started being maintained by Chinese Flutter User Group (@cfug) since 2023.

The project consents the MIT license.

所属分类

依赖

依赖清单 5 项

源码仓库

使用此插件的项目