Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodepapaya committed Apr 21, 2020
1 parent ee3eb06 commit cc8b9d2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 20 deletions.
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# show_up_animation
# show_up_animation [![Build Status](https://travis-ci.com/ashutoshsingh05/show_up_animation.svg?branch=master)](https://travis-ci.com/ashutoshsingh05/show_up_animation)

A new Flutter package project.
A flutter package to simplify implementation of "show up" animation in flutter

## Getting Started

This project is a starting point for a Dart
[package](https://flutter.dev/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
Install dependencies

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
```yaml
dependencies:
show_up_animation: ^0.0.1
```
Then import wherever you want to implement the animation
```dart
import 'package:show_up_animation/show_up_animation.dart';
```

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.

## 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 |

## Examples

![videotogif_2020 04 21_19 44 01](https://user-images.githubusercontent.com/42690541/79876554-d2d4fd00-8408-11ea-9b8e-550954f618f3.gif)
20 changes: 10 additions & 10 deletions lib/show_up_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ import 'package:flutter/material.dart';
enum Direction { vertical, horizontal }

class ShowUpAnimation extends StatefulWidget {
///The child on which to apply the given [ShowUpAnimation]
/// The child on which to apply the given [ShowUpAnimation]
final Widget child;

///The offset by which to slide and [child] into view from [Direction].
///Defaults to 0.2
/// The offset by which to slide and [child] into view from [Direction].
/// Use negative value to reverse animation [direction].Defaults to 0.2
final double offset;

///The curve used to animate the [child] into view.
///Defaults to [Curves.easeIn]
/// The curve used to animate the [child] into view.
/// Defaults to [Curves.easeIn]
final Curve curve;

///The direction from which to animate the [child] into view. [Direction.horizontal]
///will make the child slide on x-axis by [offset] and [Direction.vertical] on y-axis.
///Defaults to [Direction.vertical]
/// The direction from which to animate the [child] into view. [Direction.horizontal]
/// will make the child slide on x-axis by [offset] and [Direction.vertical] on y-axis.
/// Defaults to [Direction.vertical]
final Direction direction;

///The delay with which to animate the [child]. Takes in a [Duration] and
/// The delay with which to animate the [child]. Takes in a [Duration] and
/// defaults to 0.0 seconds
final Duration delayStart;

///The total duration in which the animation completes. Defaults to 800 milliseconds
/// The total duration in which the animation completes. Defaults to 800 milliseconds
final Duration animationDuration;

ShowUpAnimation({
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: show_up_animation
description: A flutter package to simplify implementation of "show up" animation in flutter
version: 0.0.1
author: Ashutosh Singh<201851029@iiitvadodara.ac.in>
homepage: https://github.com/ashutoshsingh05/show_up_animation

environment:
Expand Down

0 comments on commit cc8b9d2

Please sign in to comment.