Complete the code to create an AnimationController with a duration of 2 seconds.
final controller = AnimationController(vsync: this, duration: Duration(seconds: [1]));The duration of the AnimationController is set to 2 seconds using Duration(seconds: 2).
Complete the code to create a Tween that animates from 0.0 to 100.0.
final animation = Tween<double>(begin: [1], end: 100.0).animate(controller);
The Tween starts at 0.0 and ends at 100.0 to animate the value from 0 to 100.
Fix the error in the Interval to start the animation at 30% and end at 70%.
final curvedAnimation = CurvedAnimation(parent: controller, curve: Interval([1], 0.7));
The Interval curve should start at 0.3 (30%) and end at 0.7 (70%) to stagger the animation correctly.
Fill both blanks to create a TweenSequence with two steps: first from 0 to 50, then from 50 to 100.
final sequence = TweenSequence<double>([ TweenSequenceItem(tween: Tween(begin: 0, end: [1]), weight: 50), TweenSequenceItem(tween: Tween(begin: [2], end: 100), weight: 50), ]);
Both blanks use 50 to split the animation into two equal parts: 0 to 50, then 50 to 100.
Fill all three blanks to create a staggered animation with three intervals: 0-0.3, 0.3-0.6, and 0.6-1.0.
final animation1 = CurvedAnimation(parent: controller, curve: Interval(0.0, [1])); final animation2 = CurvedAnimation(parent: controller, curve: Interval([2], [3]));
The first animation runs from 0.0 to 0.3, the second from 0.3 to 0.6, and the third from 0.6 to 1.0 to create a smooth stagger.