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

tdk_bouncingwidget 封面
插件详情v1.0.4

tdk_bouncingwidget

一个轻量级的 Flutter 包,用于在点击 Flutter 小部件时实现弹跳动画。提供了三种类型的弹跳动画。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
39
喜欢数
14
Pub 分数
150

安装插件

flutter pub add tdk_bouncingwidget

插件介绍

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

tdk_bouncingwidget 是一个轻量级的 Flutter 包,可在点击时为小部件添加弹跳动画,通过微妙的视觉反馈增强用户交互体验。它提供了三种不同的弹跳动画类型,使自定义按钮和其他交互元素的响应变得简单。设计简洁且性能出色,可无缝集成到跨多个平台的 Flutter 应用中。非常适合希望在不编写复杂代码的情况下提升 UI 互动性的开发者。该包为开源并持续维护。

适合场景

  • 向按钮添加触觉反馈
  • 增强表单中的触摸交互
  • 创建有趣的用户界面元素
  • 提高应用程序的响应性
  • 自定义控件按压效果
  • 动画图标和卡片

主要特点

  • 三种内置的弹跳类型
  • 轻量且快速
  • 跨平台支持
  • 简单的 API 集成
  • 开源且文档齐全
  • 所需的样板代码最少

适合对象

  • 寻求交互反馈的UI设计师
  • 开发移动或网页应用的开发者
  • 需要直观触摸反馈的应用程序
  • 专注于流畅动画的项目
  • 初学者到中级 Flutter 开发者

使用建议

  • 仅限基于点击的动画
  • 无高级自定义选项
  • 可能不适合极简主义设计风格
  • 对大型 widget 树的性能影响
  • 不适用于复杂的手势识别

原始 README

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

Want to animate your widgets (like containers, cards etc...) bouncing In and out while clicking? Here is the package for that.

Features

This package contains a widget, where you need to wrap your own widgets ( like container, cards ect...) to animate them bounce in and out while clicking.

bouncing-widget-eg2

Getting started

As the first step we need to add this package in pubspec.yaml file or run the following command flutter pub add tdk_bouncingwidget

Usage

Just wrap your widget inside BouncingWidgetInOut widget as shown below and we are done!!

BouncingWidgetInOut(
    onPressed: () {},
    bouncingType: BouncingType.bounceInAndOut,
    child : Container(
        height: 60,
        width: 200,
        child: const Text('click to bounce')
    ))

There is one optional parameter called "bouncingType" which specifies the bouncing type of the widget. That is "Bouncing In only" or "Bouncing out Only" or both "Bouncing In and Out". By default bouncingType is "bounceInOnly".

bounceInOnly => Widget will shrink and grow based on scale factor value.

bounceOutOnly => Widget will grow and shrink based on scale factor value.

bounceInAndOut => Widget will shrink and grow first and then it will grow and shrink based on the scale factor value.

You can even customize the bouncing animation by giving duration how much time your widgets needs to animate and how large and small your widget should grow/shrink by giving scale factor value.

Additional information

Feel free to raise an issue if anything breaking, I will try to fix that ASAP. Github link mentioned above. Thanks!

所属分类

源码仓库

使用此插件的项目

暂无相关数据。