Coder Social home page Coder Social logo

thecodepapaya / show_up_animation Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 10.0 1.12 MB

A flutter package to simplify the common "show up" animation

Home Page: https://pub.dev/packages/show_up_animation

License: MIT License

Kotlin 2.11% Swift 2.08% Objective-C 0.19% Dart 95.62%
flutter animation pubdev package

show_up_animation's Introduction

show_up_animation Build Status

A flutter package to simplify the implementation of "show up" animation

Getting Started

Install dependencies

dependencies:
  show_up_animation: ^1.0.2

Then import wherever you want to implement the animation

import 'package:show_up_animation/show_up_animation.dart';

ShowUpAnimation

Wrap any widget you want to animate inside ShowUpAnimation widget and provide a Duration() to delayStart field to control after how much delay the animation fires.

ShowUpAnimation(
  delayStart: Duration(seconds: 1),
  animationDuration: Duration(seconds: 1),
  curve: Curves.bounceIn,
  direction: Direction.vertical,
  offset: 0.5,
  child: YourWidget(),
),

ShowUpList

To create a list of "show up" animations, use ShowUpList and provide your list of widgets to children parameter.

ShowUpList(
  direction: Direction.horizontal,
  animationDuration: Duration(milliseconds: 1500),
  delayBetween: Duration(milliseconds: 800),
  offset: -0.2,
  children: <Widget>[
    Widget1(),
    Widget2(),
    Widget3(),
    Widget4(),
  ],
),

Properties

ShowUpAnimation Properties

You can customize how to do you want to animate your child using the parameters described below.

Property Function
child The widget on which to apply the given ShowUpAnimation
offset The offset by which to slide and [child] into view from [Direction]. Use negative value to reverse animation [direction]. Defaults to 0.2
curve The curve used to animate the [child] into view. Defaults to [Curves.easeIn]
direction horizontal or vertical
delayStart The delay with which to animate the [child]. Takes in a [Duration] and defaults to 0 seconds
animationDuration The total duration in which the animation completes. Defaults to 800 milliseconds

ShowUpList Properties

Property Function
children The list of widgets on which to apply the given ShowUpAnimation
offset The offset by which to slide and [child] into view from [Direction]. Use negative value to reverse animation [direction]. Defaults to 0.2
curve The curve used to animate each [child] into view. Defaults to [Curves.easeIn]
direction horizontal or vertical
delayBetween he delay between animating each [children] into view. Takes in a [Duration] and defaults to 300 milliseconds
animationDuration The total duration in which the animation of each child completes. Defaults to 500 milliseconds

Demo

videotogif_2020 04 21_19 44 01 videotogif_2020 04 30_04 07 18

show_up_animation's People

Contributors

alexays avatar douglasramos avatar jja08111 avatar thecodepapaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

show_up_animation's Issues

Directions not working

hi, i tried using direction horizontal but always vertical, changed the widget manually to row for working good

Null safety?

Our team is a few packages away from null-safety migration for our app. Any chance to migrate this package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.