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

插件详情v0.1.0

flutter_network_image

一个 Flutter 包,提供 ImageProvider,可自动重试失败的网络图片加载,确保在移动和 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 项

源码仓库

使用此插件的项目

暂无相关数据。