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

插件详情v1.0.1

spinner

一个简单的动画旋转器,循环遍历固定大小的部件列表

近 30 天下载
15
喜欢数
23
Pub 分数
40

安装插件

flutter pub add spinner

插件介绍

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

一个轻量级的Flutter包,提供一个简单的动画旋转器,以循环方式在预定义的固定大小小部件列表中切换。非常适合用于指示加载状态或持续进程,并提供流畅的视觉反馈。该旋转器可自定义且易于集成到任何UI中,为异步操作期间的用户体验提供了简洁高效的增强方式。

适合场景

  • 表单中的加载指示器
  • 显示正在进行的后台任务
  • 在数据获取过程中提升用户体验
  • 导航过渡中的视觉反馈
  • 简单的动画占位符

主要特点

  • 圆形小部件循环
  • 固定大小的 widget 支持
  • 平滑的动画过渡
  • 所需配置最少
  • 轻量且高效

适合对象

  • 寻求简单加载动画的开发者
  • 需要细微视觉提示的UI设计师
  • 需要轻量级进度指示器的应用程序
  • 性能要求严格的项目

使用建议

  • 限于固定大小的控件
  • 无内置的旋转速度自定义选项
  • 不适合复杂的动画
  • 需要手动处理 widget 生命周期
  • 依赖外部源代码以获取更新

原始 README

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

Spinner

This flutter package implements a simple Spinner animation that cycles through any number of fixed size child widgets. Useful for selecting a random word from a list and displaying it to a user.

It can animate vertically, up or down:

Or horizontally, left or right:

Usage

To use this plugin, add spinner as a dependency in your pubspec.yaml file.

Example

See the example project in the repo for a quick demo

API

Spinner has several useful parameters. You can see them used in the example file

  • duration: change the duration of the animation

  • animationSpeed: change how fast the animation moves and what index the animation lands on

  • spinDirection: change the direction of animation

  • containerCount: number of containers that should appear on screen

  • containerSize: for vertical scroll, this is the width of each container produced by the builder function. For horizontal, this is the height

  • builder: a function that takes in an integer and returns a widget with height/width of containerSize

  • curve: the curve for the animation to follow. Defaults to easeInOutCubic

  • callback: a function called when the animation completes

  • zoomFactor: optional zoom in by this amount during the animation. It looks something like this, with a zoom factor of 1.5:

所属分类

源码仓库

使用此插件的项目

暂无相关数据。