11

+
            class _BouncingBallDemoState extends State<BouncingBallDemo>

12

+
                with SingleTickerProviderStateMixin {

12
13

@override

13
14

void initState() {

14
15

super.initState();

This step uses the SingleTickerProviderStateMixin
with _BouncingBallDemoState,
but you can also use TickerProviderStateMixin to make your widget
available as a TickerProvider for AnimationController.
Here are some considerations for deciding between the two:

If you are only creating a single AnimationController
from a State object (as in this example)
you can use the SingleTickerProviderStateMixin.