搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.0

flutter_network_image

提供 ImageProvider 的 Flutter 套件,可自動重試失敗的網路圖片載入,確保在行動裝置與 Web 平台上順暢載入圖片。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
152
喜歡數
10
Pub 分數
130

安裝套件

flutter pub add flutter_network_image

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,透過自動重試失敗的網路請求來增強影像載入,確保在行動與 Web 平台上可靠地顯示影像。它擴展標準的 ImageProvider 以優雅處理暫時性的網路問題,在連線不穩定時改善使用者體驗。此套件設計為與現有的 Flutter 應用程式無縫整合,支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 與 Linux。它簡化了遠端影像的處理,無需自訂重試邏輯。

適用情境

  • 從不可靠的網絡加載圖像
  • 改善間歇性連接期間的使用者體驗
  • 自動重試失敗的圖像下載
  • 支援跨平台影像載入
  • 處理暫時伺服器中斷

主要特色

  • 自動重試機制
  • 跨平台相容性
  • 與 Image 小部件的無縫整合
  • 處理暫時性網路故障
  • 擴展 ImageProvider 接口

適合對象

  • 應用頻繁網路波動
  • 圖像密集型應用
  • 需要強大影像載入功能的Web和行動應用
  • 尋求影像重試最小設定的開發者
  • 針對多個平台的專案

使用建議

  • 由於重試,可能會增加載入時間
  • 需要互聯網連接才能運行
  • 不適用於靜態或本機影像
  • 對重試邏輯的自訂有限
  • 取決於底層網路堆疊的效能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flutter_network_image

flutter_network_image is a flutter package that provides an ImageProvider that automatically retries failed network image loads, ensuring smooth image loading on mobile and web platforms.

Example:

Image(
  image: NetworkImageProvider(
  'https://image.com/avatar.png',
  retryWhen: (Attempt attempt) => attempt.counter < 10,
),

LICENSE

MIT License

Copyright (c) 2023 Abdelouahed Medjoudja

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。