flutter simple animations
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.
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 (pub.dartlang.org):
example app
you find these and other examples in example app.
Comments are closed.