September 2019
Beginner
512 pages
12h 52m
English
Instead of changing the button rotation directly, we can instead make it progressive by using the AnimationController class:

In this example, we are creating our widget in a very similar way to before (in Chapter 14, Widget Graphic Manipulations):
_rotationAnimationButton() { return Transform.rotate( angle: _angle, child: RaisedButton( child: Text("Rotated button"), onPressed: () { if (_animation.status == AnimationStatus.completed) { _animation.reset(); _animation.forward(); } }, ), ); }
As you can see, there are two important things to notice: ...
Read now
Unlock full access