simple_animations 1.3.7

Simple Animations #

Awesome Flutter Pub

Simple Animations is a package for Flutter to boost your animation productivity by simplifying the way to create animations.

Project goal #

Flutter has a strong and flexible foundation of animation capabilities.

But even small animations feel verbose and blow up your code base. Animations are one of the most desired aspects of Flutter, while being difficult to master.

Simple Animation's goal is to solve this issue, by

  • simplifying the way to creates custom animations,
  • softly dipping developers into the animation topic,
  • offering a lot of documentation and examples.

Getting started #

There are multiple ways to get started:

Examples #

Typewriter Box #

This custom animation seems simple but it's rather complex:


It's combining a staggered animation sequence with an enduring animation:

  • At the beginning it animates the height of a box. After that it increases the width.
  • While increasing the width a typewriter-like animated underscore appears and persists.
  • Shortly before the width reaches it's final size, it starts to type-write a text.

With traditional Flutter animation classes this will end in a huge StatefulWidget with multiple AnimationController, Tweens and all that initState and onDispose overhead.

With simple_animation you can do it stateless just by using some fancy ControlledAnimation widgets.

The whole animation just takes about 60 lines of code while maintaining readability. (You can find the source code here. I only counted the lines that are responsible for the animation.)

Pub Example Tab #

This is the example from the example page (


Example App #

You find these and other examples in Example App.



1.3.7 #

  • This release contains fixes requested by the Flutter Ecosystem Committee:
    • Added API documentation and improved test coverage
    • Accidentally public method LoopTask.finishIteration(Duration) is now private. Instead you can use public APIs of AnimationControllerX to control the tasks.
    • Accidentally public method AnimationControllerX.completeCurrentTask() is now private. Instead you can use AnimationControllerX.forceCompleteCurrentTask().

1.3.6 #

  • Fixed bug in type generics

1.3.5 #

  • Preparations for avoiding implicit casting

1.3.4 #

  • Fixed documentation: missing line about manual creation of AnimationControllerX

1.3.1 - 1.3.3 #

  • Upgraded to Flutter 1.7 and Dart 2.4

1.3.0 #

  • Upgraded to Flutter 1.5 and Dart 2.3

New features #

  • AnimationControllerX a new, powerful AnimationController
  • AnimationControllerMixin to easily setup AnimationControllerX
  • 5 types of AnimationTasks to use for AnimationControllerX

1.2.0 #

New features #

  • Rendering a widget for building of continuous animations
  • AnimationProgress a utility class that helps you with Duration-based Animations

1.1.1 #

  • Fixed strange effect when rebuilding a ControlledAnimation with playback set to Playback.MIRROR

1.1.0 #

New features #

  • New property startPosition for ControlledAnimation widget: you can now specify the initial start position (time) of the animation. This is useful for designing interactive UI elements.

1.0.0 #

  • Initial release

New features #

  • ControlledAnimation: Widget for simple tween-based custom animations
  • MultiTrackTween: Animatable for tweening multiple properties at once

0.x #

  • Setting up the project


// "This is just one possibility what
//     you can do with simple_animations!"
// Documentation:
// Example App:

import 'dart:math';
import 'package:flutter/material.dart';
import 'package:simple_animations/simple_animations.dart';

void main() => runApp(Example());

class Example extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(child: Center(child: buildAnimation())),

  final tween = MultiTrackTween([
    Track("size").add(Duration(seconds: 4), Tween(begin: 0.0, end: 150.0)),
        .add(Duration(seconds: 2),
            ColorTween(begin:, end:,
            curve: Curves.easeIn)
        .add(Duration(seconds: 2),
            ColorTween(begin:, end:,
            curve: Curves.easeOut),
    Track("rotation").add(Duration(seconds: 1), ConstantTween(0.0)).add(
        Duration(seconds: 3), Tween(begin: 0.0, end: pi / 2),
        curve: Curves.easeOutSine)

  Widget buildAnimation() {
    return ControlledAnimation(
      playback: Playback.MIRROR,
      duration: tween.duration,
      tween: tween,
      builder: (context, animation) {
        return Transform.rotate(
          angle: animation["rotation"],
          child: Container(
            width: animation["size"],
            height: animation["size"],
            color: animation["color"],

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  simple_animations: ^1.3.7

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:simple_animations/simple_animations.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/simple_animations/controlled_animation.dart. (-0.50 points)

Analysis of lib/simple_animations/controlled_animation.dart reported 1 hint:

line 187 col 10: This function has a return type of 'Widget', but doesn't end with a return statement.

Format lib/simple_animations/animation_task/from_to_task.dart.

Run flutter format to format lib/simple_animations/animation_task/from_to_task.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies