FLUTTER ECOSYSTEM

jemisgoti/simple_ripple_animation

简单且可自定义的涟漪动画,适用于 Flutter 应用!

simple_ripple_animation 项目封面
Stars
8
Forks
4
最近推送(UTC)
2024年11月16日
项目状态
未归档
Jemis Goti GitHub avatar
GITHUB User

Jemis Goti ↗

Imaginative at Work!

语言C++CMakeDartCHTMLSwiftShellKotlinObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 3 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}
  • hyper_lint开发依赖^0.0.2

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README
https://raw.githubusercontent.com/jemisgoti/simple_ripple_animation/4a901786d9a99ead73dff64d324097aac5f7b41b/readme_assets/banner.png

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.

https://jemisgoti.github.io/simple_ripple_animation/readme_assets/image1.png
Mobile
https://jemisgoti.github.io/simple_ripple_animation/readme_assets/tab.png
Tablet
https://jemisgoti.github.io/simple_ripple_animation/readme_assets/desktop.png
Desktop
https://jemisgoti.github.io/simple_ripple_animation/readme_assets/web.png
Web

Main Contributors

https://avatars.githubusercontent.com/u/46031164
Jemis Goti
https://avatars.githubusercontent.com/u/75033711
Furkan Arslan

Thanks

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