September 2019
Beginner
512 pages
12h 52m
English
Just like before, we can accomplish a better look in our translation transformation and make it smoother by using AnimationController:

The construction of our widget is similar to before; the only exception is the usage of the Transform.translate() construction. Now, we have a different value type than double. Let's see what we need to change to make an Offset animation:
createTranslateAnimation() { var controller = AnimationController( vsync: this, debugLabel: "animations demo", duration: Duration(seconds: 2), ); var animation = controller.drive(Tween<Offset>( begin: Offset.zero, end: Offset(70, 200), )); animation.addListener(() ...Read now
Unlock full access