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

simple_ripple_animation 封面
插件详情v0.1.1

simple_ripple_animation

该包提供了一个易于设置和自定义的波纹动画小部件,且在您选择的任何颜色下都显得非常美观。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
7660
喜欢数
153
Pub 分数
160

安装插件

flutter pub add simple_ripple_animation

插件介绍

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

一个 Flutter 包,提供了一个简单且可自定义的涟漪动画小部件。它使开发者能够轻松地在按钮、点击或任何交互元素上添加视觉上吸引人的涟漪效果,适用于多个平台。该动画流畅,并支持自定义颜色、大小和持续时间,非常适合增强应用程序中的用户反馈。设置简单,可无缝集成到现有项目中。

适合场景

  • 向按钮添加触摸反馈
  • 通过视觉效果增强用户界面交互
  • 创建动画背景
  • 提高移动应用中的用户参与度
  • 设计网页上的交互元素
  • 自定义波纹外观以用于品牌标识

主要特点

  • 轻松设置,代码量极少
  • 支持自定义颜色和大小
  • 流畅、高性能的动画
  • 跨平台兼容性
  • 可配置的涟漪持续时间和强度
  • 用于自定义的简单 API

适合对象

  • 寻求视觉精致的UI/UX设计师
  • 开发交互式应用的开发者
  • 需要细微触觉反馈的项目
  • 面向多个平台的应用程序
  • 希望快速实现动画的团队
  • 具有动态反馈的创意界面

使用建议

  • 如果过度使用,可能会影响性能
  • 有限的高级动画控制
  • 最适合小型涟漪效果
  • 不适合复杂的动态设计
  • 需要仔细选择颜色以确保可见性
  • 依赖于平台特定的渲染行为

原始 README

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

Simple Ripple Animation

style: very good analysis License: MIT

This package provide ripple animation widget that can be customised to meet your needs. It's easy to set up and customize, and it looks beautiful in any color you choose.

Features

This package support following parameter and methods.

Parameter

RippleAnimationwidget provide follwoing parameter to config your ripple animation effect.

Parameter defined for RippleAnimation widget:

Name Type Description
child Widget This child will be placed at center of the animation.
delay Duration This will be delay between two ripple wave.
minRadius double Minimum radius of the ripple wave.
maxRadius double Maximum radius of the ripple wave.
color Color Color of the animation.
ripplesCount int number of rippleCount in the wave.
duration Duration duration of the animation
repeat bool Provide true if you want to repeat animation

Getting started

Installing

  1. Add dependencies to pubspec.yaml

    Get the latest version in the 'Installing' tab on pub.dev

    dependencies:
        simple_ripple_animation: <latest-version>
    
  2. Run pub get.

    flutter pub get
    
  3. Import package.

    import 'package:simple_ripple_animation/simple_ripple_animation.dart';
    

Implementation

  1. Wrap Widget with RippleAnimation and assign needed parameter.

             RippleAnimation(
                child: CircleAvatar(
                  minRadius: 75,
                  maxRadius: 75,
                  backgroundImage: NetworkImage(Constants.avtarUrl),
                ),
                color: Colors.deepOrange,
                delay: const Duration(milliseconds: 300),
                repeat: true,
                minRadius: 75,
                maxRadius: 140,
                ripplesCount: 6,
                duration: const Duration(milliseconds: 6 * 300),
              )
    

Preview

Screenshot

TODO: Here is the few screenshot for the preview. This will be remove in new verison becuase pub.dev now support screenshot.


Mobile

Tablet

Desktop

Web

Main Contributors


Jemis Goti

Furkan Arslan

Thanks

Thank you for using this package and keep supporting opensource community.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。