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

widget_loading 封面
插件详情v0.4.0

widget_loading

一种简单的方法,可以在尚未有内容显示时隐藏控件,同时需要加载动画。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
536
喜欢数
94
Pub 分数
150

安装插件

flutter pub add widget_loading

插件介绍

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

WidgetLoading 是一个 Flutter 包,可简化在内容尚未可用时显示加载动画的过程。它会自动隐藏主控件并显示可自定义的加载指示器,确保在异步操作期间提供流畅的用户体验。适用于数据获取或应用初始加载等场景,支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。该包轻量且易于集成,只需最少的样板代码。

适合场景

  • 在数据获取期间显示加载状态
  • 在等待 API 响应时显示占位符
  • 改善应用初始加载时的用户体验
  • 用动画指示器替换空状态
  • 简化小部件的条件渲染

主要特点

  • 主部件的自动隐藏
  • 可自定义的加载动画
  • 所需设置最少
  • 跨平台兼容性
  • 支持异步操作
  • 简洁、可读的 API

适合对象

  • 寻求简单加载状态管理的开发者
  • 频繁数据获取的应用
  • 需要流畅过渡的UI
  • 初学者学习Flutter状态处理
  • 致力于打造精致加载体验的项目

使用建议

  • 除了基本动画外,自定义功能有限
  • 可能需要额外的样式设置以支持复杂的用户界面
  • 不适用于非异步加载场景
  • 依赖外部依赖项以实现高级功能
  • 最好与其他状态管理解决方案结合使用

原始 README

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

Widget Loading

pub.dev github likes popularity pub points license

buy me a coffee

If you like this package, please leave a like there on pub.dev and star on GitHub.

Simple widgets for loading widget contents. It's an easy way to hide a widget when you have nothing to show and need a loading animation at the same time.

example1 example2

Easy Usage

Easy to use and highly customizable.

WiperLoading
WiperLoading(
  loading: loading,
  interval: interval,
  wiperDeformingFactor: deformingFactor,
  curve: curve,
  wiperBuilder: builder
  wiperWidth: wiperWidth,
  wiperColor: wiperColor,
  wiperBuilder: wiperBuilder,
  sizeCurve: sizeCurve,
  sizeDuration: sizeDuration,
  direction: wiperDirection,
  child: Padding(
    padding: const EdgeInsets.all(15.0),
    child: yourChild,
  ),
  ...
)

or

WiperLoading.future(future: futureOfYourWidget, ...)
CircularWidgetLoading
CircularWidgetLoading(
  loading: loading,
  child: yourChild,
  ...
)

所属分类

源码仓库

使用此插件的项目

暂无相关数据。