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

flutter_animated_button 封面
插件详情v2.0.4

flutter_animated_button

一个包含一系列酷炫且美观的按钮动画的 Flutter 包项目。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1420
喜欢数
306
Pub 分数
150

安装插件

flutter pub add flutter_animated_button

插件介绍

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

一个 Flutter 包,提供多种视觉上吸引人且流畅的按钮动画。旨在通过跨多个平台的动态、引人入胜的按钮交互来增强用户界面。该包提供了即用型的动画按钮,可轻松集成到应用程序中,以改善视觉反馈和用户体验。非常适合希望在不进行大量自定义编码的情况下增添亮点的开发者。

适合场景

  • 通过交互式按钮增强应用界面
  • 在表单中添加视觉反馈
  • 提高移动和网页应用的用户参与度
  • 创建现代着陆页
  • 设计游戏化应用元素

主要特点

  • 多种预构建的动画样式
  • 轻松集成,代码量极少
  • 跨平台兼容性
  • 可自定义的按钮外观
  • 平滑的过渡效果
  • 轻量且高效

适合对象

  • 寻找动画组件的UI/UX设计师
  • 开发交互式 Flutter 应用的开发者
  • 初学者探索 Flutter 动画
  • 需要引人入胜的用户互动的应用程序
  • 专注于现代、精致的界面

使用建议

  • 可能会略微增加包大小
  • 动画可能会影响低端设备的性能
  • 超出所提供主题的自定义有限
  • 最适合非关键的UI元素
  • 需要了解基本的 Flutter widget 使用方法

原始 README

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

flutter_animated_button :dizzy: :champagne:


Installing

Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_animated_button: <latest_version>
Import it

Now in your Dart code, you can use:

import 'package:flutter_animated_button/flutter_animated_button.dart';



Contribute to Development

Your contribution will help improve the plugin

Buy Me A Coffee

Usage

You can override the animationDuration of animation of the button by setting its duration in each AnimatedButton class, also you can get animationController for animation status and animation value during the animation. You can change text style, selected textColor and background color of button by textStyle,selectedTextColor,backgroundColor and selectedBackgroundColor. If you want revert animation when button already select then you can do it by isReverse property.

 AnimatedButton(
                width: 200,
                text: 'SUBMIT',
                selectedTextColor: Colors.black,
                transitionType: TransitionType.BOTTOM_TO_TOP,
                textStyle: TextStyle(
                    fontSize: 28,
                    letterSpacing: 5,
                    color: Colors.deepOrange,
                    fontWeight: FontWeight.w300),
              )


Animation On
  • AnimatedOn.onTap
  • AnimatedOn.onHover


Used in App



Some new animation in latest version :zap:

  • Animations : LEFT_TOP_ROUNDER, LEFT_BOTTOM_ROUNDER, BOTTOM_CENTER_ROUNDER, CENTER_ROUNDER...etc
  • Selected button text support

. .

Available Animations :dizzy:

AnimatedButton

  AnimatedButton(
              height: 70,
              width: 200,
              text: 'SUBMIT',
              isReverse: true,
              selectedTextColor: Colors.black,
              transitionType: TransitionType.BOTTOM_TO_TOP,
              textStyle: GoogleFonts.nunito(
                  fontSize: 28,
                  letterSpacing: 5,
                  color: Colors.white,
                  fontWeight: FontWeight.w300),
            ),
  AnimatedButton(
             height: 70,
             width: 200,
             text: 'SUBMIT',
             isReverse: true,
             selectedTextColor: Colors.black,
             transitionType: TransitionType.LEFT_TO_RIGHT,
             textStyle: submitTextStyle,
             backgroundColor: Colors.black,
             borderColor: Colors.white,
             borderRadius: 0,
             borderWidth: 2,
           ),
    AnimatedButton(
              height: 70,
              width: 200,
              text: 'SUBMIT',
              isReverse: true,
              selectedTextColor: Colors.black,
              transitionType: TransitionType.LEFT_TO_RIGHT,
              textStyle: submitTextStyle,
              backgroundColor: Colors.black,
              borderColor: Colors.white,
              borderRadius: 50,
              borderWidth: 2,
            ),

AnimatedButton.strip

  AnimatedButton.strip(
              width: 200,
              height: 70,
              text: 'SUBMIT',
              isReverse: true,
              selectedTextColor: Colors.black,
              stripTransitionType: StripTransitionType.LEFT_TO_RIGHT,
              selectedBackgroundColor: Colors.white,
              textStyle: GoogleFonts.nunito(
                  fontSize: 28,
                  letterSpacing: 5,
                  color: Colors.white,
                  fontWeight: FontWeight.w300),
            ),


Available Animations Types :sparkles:


AnimatedButton
LEFT_TO_RIGHT CENTER_LR_IN LEFT_TOP_ROUNDER RIGHT_TOP_ROUNDER CENTER_ROUNDER
RIGHT_TO_LEFT CENTER_TB_IN LEFT_CENTER_ROUNDER RIGHT_CENTER_ROUNDER -
TOP_TO_BOTTOM CENTER_LR_OUT LEFT_BOTTOM_ROUNDER TOP_CENTER_ROUNDER -
BOTTOM_TO_TOP CENTER_TB_OUT RIGHT_BOTTOM_ROUNDER BOTTOM_CENTER_ROUNDER -
AnimatedButton.strip
LEFT_TO_RIGHT
RIGHT_TO_LEFT
TOP_TO_BOTTOM
BOTTOM_TO_TOP


Bugs or Requests :bug:

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.


License :closed_lock_with_key:

MIT License

所属分类

源码仓库

使用此插件的项目