+
                      controller.reverse();

43

+
                    } else if (status == AnimationStatus.dismissed) {

44

+
                      controller.forward();

45

+
                    }

46

+
                  })

47

+
                  ..addStatusListener((status) => print('$status'));

40
48

controller.forward();

41
49

App source: animate3

Refactoring with AnimatedBuilder

What's the point?

An AnimatedBuilder understands how to render the transition.

An AnimatedBuilder doesn’t know how to render the widget,
nor does it manage the Animation object.