defaultTransitionBuilder static method

Widget defaultTransitionBuilder(
  1. Widget child,
  2. Animation<double> animation

The transition builder used as the default value of transitionBuilder.

The new child is given a FadeTransition which increases opacity as the animation goes from 0.0 to 1.0, and decreases when the animation is reversed.

This is an AnimatedSwitcherTransitionBuilder function.


static Widget defaultTransitionBuilder(Widget child, Animation<double> animation) {
  return FadeTransition(
    key: ValueKey<Key?>(child.key),
    opacity: animation,
    child: child,