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

插件详情v1.0.2+1

animated_progress_button

您在寻找让您的按钮变得专业的解决方案吗?这个包可以为您提供来自Pinterest的所有动画灵感。

近 30 天下载
9
喜欢数
26
Pub 分数
30

安装插件

flutter pub add animated_progress_button

插件介绍

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

animated_progress_button 包通过流畅且视觉上吸引人的动画增强了标准按钮,其灵感来自 Pinterest。它允许开发者创建可在不同状态(如空闲、加载和成功)之间过渡的交互式进度按钮,并支持自定义视觉效果和行为。非常适合现代用户界面,可为表单提交或数据处理等操作提供动态反馈。该包轻量且易于集成,无需复杂代码即可为用户界面增添精致体验。其动画样式旨在通过响应式反馈提升用户参与度。

适合场景

  • 带有视觉反馈的表单提交
  • 移动应用中的加载状态
  • 交互式操作按钮
  • 提升电子商务应用的用户体验
  • 创建引人入胜的入门流程

主要特点

  • Pinterest 风格的动画设计
  • 可自定义的按钮状态
  • 在空闲/加载/成功状态之间的平滑过渡
  • 与 Flutter 小部件的轻松集成
  • 对自定义颜色和图标的支持

适合对象

  • 寻求精美用户界面元素的开发者
  • 需要直观用户反馈的应用程序
  • 注重设计的 Flutter 项目
  • 带有交互式表单的移动应用
  • 致力于打造现代、引人入胜的界面的团队

使用建议

  • 有限的平台特定自定义
  • 无内置的可访问性功能支持
  • 动画可能会影响低端设备的性能
  • 需要手动处理状态管理
  • 不适合高度复杂的交互式工作流

原始 README

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

Animated Progress Button

Animated loading button to make you app button looks smoother. Take inspritation from Pinterest https://www.pinterest.com/pin/671177150707141229/

alt text

Usages

Create animatedButtonController for controlling the button.

import 'package:animated_progress_button/animated_progress_button.dart';

final AnimatedButtonController animatedButtonController = AnimatedButtonController();

Then customize the button like your own way Noted that you must call animatedButtonController.completed() after getting response from server in order to complete the button animation

AnimatedButton(
   controller: animatedButtonController,
   color: Colors.greenAccent,
   text: 'Log in',
   loadingText: 'Loading',
   loadedIcon: Icon(Icons.check, color: Colors.white),
   onPressed: () async {
       /// calling your API here and wait for the response.
       await Future.delayed(Duration(seconds: 5)); // simulated your API requesting time.
       animatedButtonController.completed(); // call when you get the response
       await Future.delayed(Duration(seconds: 2));
       animatedButtonController.reset(); // call to reset button animation
   },
),

所属分类

源码仓库

使用此插件的项目

暂无相关数据。