搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案