Material Transitions in Flutter with the Animations Package

Sep 21 2021 Dart 2.13, Flutter, VS Code 1.59

Part 1: Material Transitions in Flutter with the Animations Package

3. Create a FadeThrough Animation

Lesson Complete

Play Next Lesson
Next
Save for later
About this episode
See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 2. Understand the Container Transform Animation Next episode: 4. Work with Fade Transitions

This video was last updated on Sep 21 2021

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

The next transition on our list is the FadeThroughTransition. We’ll be using it to switch between pages from the BottomNavigationBar.

PageTransitionSwitcher(
    transitionBuilder: (
        Widget child,
        Animation<double> primaryAnimation,
        Animation<double> secondaryAnimation,
    ) {

    },
    child: IndexedStack(
        key: ValueKey<int>(_selectedIndex),
        index: _selectedIndex,
        children: <Widget>[..._pages],
    ),
),
...
return FadeThroughTransition(
    child: child,
    animation: primaryAnimation,
    secondaryAnimation: secondaryAnimation,
);
...