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

loading_animations 封面
插件详情v2.2.0

loading_animations

一个包含一系列简单但高度可定制的加载动画的 Flutter 包。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
6730
喜欢数
272
Pub 分数
160

安装插件

flutter pub add loading_animations

插件介绍

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

一个 Flutter 包,提供一系列简单且高度可定制的加载动画,适用于应用程序。旨在提升等待状态下的用户体验,提供流畅且视觉上吸引人的指示器,可轻松集成到各种 UI 组件中。这些动画轻量级,并支持多个平台,确保在 Android、iOS、Web、macOS、Windows 和 Linux 上性能一致。自定义选项包括颜色、大小、速度和动画样式,使其能够适应不同的设计需求。

适合场景

  • 表单中的加载指示器
  • 启动画面
  • 数据获取状态
  • 页面过渡
  • 后台任务进度
  • 自定义旋转器设计

主要特点

  • 高度可定制的动画
  • 支持所有主要平台
  • 轻量且高性能
  • 与 Flutter 小部件的轻松集成
  • 多种动画样式
  • 可配置的颜色和速度

适合对象

  • 寻求快速加载指示器的开发者
  • 需要一致 UI 反馈的应用程序
  • 希望拥有灵活动画选项的设计师
  • 面向多平台的项目
  • 原型设计与快速开发

使用建议

  • 仅限基本动画类型
  • 可能需要额外的样式来支持复杂的用户界面
  • 未针对极高频率的更新进行优化
  • 最适合简单的加载场景
  • 无内置的本地化或可访问性功能

原始 README

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

Flutter Loading Animations Pub

A simple yet very customizable set of loading animations for Flutter projects.

Installation

Add the following to your pubspec.yaml file:

...
dependencies:
  ...
  loading_animations: "^2.1.0"
...

Then import the file to your project:

import 'package:loading_animations/loading_animations.dart';

How to use

Choose a loading animation from the list:

Flipping
  • LoadingFlipping.circle()
  • LoadingFlipping.square()
Rotating
  • LoadingRotating.square()
Double Flipping
  • LoadingDoubleFlipping.circle()
  • LoadingDoubleFlipping.square()
Bouncing Grid
  • LoadingBouncingGrid.circle()
  • LoadingBouncingGrid.square()
Filling
  • LoadingFilling.square()
Fading Line
  • LoadingFadingLine.circle()
  • LoadingFadingLine.square()
Bouncing Line
  • LoadingBouncingLine.circle()
  • LoadingBouncingLine.square()
Jumping Line
  • LoadingJumpingLine.circle()
  • LoadingJumpingLine.square()
Bumping Line
  • LoadingBumpingLine.circle()
  • LoadingBumpingLine.square()

Then add the following code:

LoadingFlipping.circle(
  color: Colors.blue,
);

Or you can customize it a bit:

LoadingFlipping.square(
  borderColor: Colors.cyan,
  size: 30.0,
);

Or customize it even more!

LoadingFlipping.circle(
  borderColor: Colors.cyan,
  borderSize: 3.0,
  size: 30.0,
  backgroundColor: Colors.cyanAccent,
  duration: Duration(milliseconds: 500),
);

For more customization, please look inside the loading animation files.

Note: all the animations come ready to go just by calling LoadingDoubleFlipping.square(), for example.

Many basic animations contain .circle() and .square() variations by default.

Examples

Note: the following gifs are not yet updated to reflect version 2.1.0

For a more true experience of the animations and its variations, download the example project and run using flutter run --profile.

LoadingFlipCircle() LoadingRotatingSquare()
LoadingFlipBox() LoadingBouncingGrid()

Contribution

Please feel free to:

  • ask questions
  • report issues and bugs
  • suggest code improvements
  • request new features

Create an issue or a pull request and I will be more than happy to review it and add to the project.

Thanks

This project was heavily based on cssfx

If you like this package, don't forget to hit the ⭐️ button!

Thanks and happy coding 👻

所属分类

源码仓库

使用此插件的项目