Unverified Commit b106fd0d authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Fix-up code sample for TweenSequence (#34679)

parent 26021191
...@@ -7,6 +7,9 @@ import 'package:flutter/foundation.dart'; ...@@ -7,6 +7,9 @@ import 'package:flutter/foundation.dart';
import 'animation.dart'; import 'animation.dart';
import 'tween.dart'; import 'tween.dart';
// Examples can assume:
// AnimationController myAnimationController;
/// Enables creating an [Animation] whose value is defined by a sequence of /// Enables creating an [Animation] whose value is defined by a sequence of
/// [Tween]s. /// [Tween]s.
/// ///
...@@ -14,9 +17,10 @@ import 'tween.dart'; ...@@ -14,9 +17,10 @@ import 'tween.dart';
/// animation's duration. Each tween defines the animation's value during the /// animation's duration. Each tween defines the animation's value during the
/// interval indicated by its weight. /// interval indicated by its weight.
/// ///
/// For example, to define an animation that uses an easing curve to interpolate /// {@tool sample}
/// between 5.0 and 10.0 during the first 40% of the animation, remain at 10.0 /// This example defines an animation that uses an easing curve to interpolate
/// for the next 20%, and then return to 10.0 for the final 40%: /// between 5.0 and 10.0 during the first 40% of the animation, remains at 10.0
/// for the next 20%, and then returns to 5.0 for the final 40%.
/// ///
/// ```dart /// ```dart
/// final Animation<double> animation = TweenSequence( /// final Animation<double> animation = TweenSequence(
...@@ -38,6 +42,7 @@ import 'tween.dart'; ...@@ -38,6 +42,7 @@ import 'tween.dart';
/// ], /// ],
/// ).animate(myAnimationController); /// ).animate(myAnimationController);
/// ``` /// ```
/// {@end-tool}
class TweenSequence<T> extends Animatable<T> { class TweenSequence<T> extends Animatable<T> {
/// Construct a TweenSequence. /// Construct a TweenSequence.
/// ///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment