Implicit Flutter Animations

Oct 4 2022 · Dart 2.17, Flutter 3.0, Visual Studio Code 1.7

Part 1: Animation Fundamentals

03. Add Realistic Motions with Curves

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 02. Understand Implicit Animations Next episode: 04. Create Custom Implicit Animations

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 03. Add Realistic Motions with Curves

The student materials have been reviewed and are updated as of August 2022.

The updated material uses null safety and also deploys the use of const keyword with constant constructors as per the Flutter lint rules that is used to encourage good coding practises.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Let’s take a look at this animation: If you notice, the slide animation animates linearly. Which means it increases at a steady rate and does not really mimic a real world movement.

AnimatedPositioned(
    ...
    curve: Curves.bounceOut
    ...
)
AnimatedPositioned(
    ...
    curve: Curves.easeIn
    ...
)
AnimatedPositioned(
    ...
    curve: Curves.easeInOutQuint
    ...
)
...
bool _showBox = false;
...
body: Center(
    child: AnimatedContainer(
        duration: const Duration(milliseconds: 1000),
        curve: Curves.bounceOut,
        width: _showBox ? 200 : 100,
        height: _showBox ? 200 : 100,
        color: _showBox ? Colors.orange : Colors.green,
    ),
)

[Browser Window] Curves Page

Here you have different curves. Playing them shows how the animation progresses from 0.0 to 1.0 lifespan of an animation. By the side, you have a visual feel of how each curve affects different animation effects.