In this recipe, you will use AnimatedBuilder widgets, which simplify the process of writing animations and provide some important performance optimizations.
In particular, you will design a "yo-yo" animation. By using an AnimatedBuilder, your animations will only need to redraw the descendants of the widget. In this way, you will both optimize the animations and simplify the process of designing them.