Unverified Commit ec5c2e3e authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Add links to implicit animation illustrations. (#21092)

This adds links to the already existing animated diagrams in the asset-for-api-docs repo.
parent d1417c72
...@@ -191,6 +191,10 @@ class ThemeDataTween extends Tween<ThemeData> { ...@@ -191,6 +191,10 @@ class ThemeDataTween extends Tween<ThemeData> {
/// Animated version of [Theme] which automatically transitions the colors, /// Animated version of [Theme] which automatically transitions the colors,
/// etc, over a given duration whenever the given theme changes. /// etc, over a given duration whenever the given theme changes.
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.elasticInOut].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_theme.mp4}
///
/// See also: /// See also:
/// ///
/// * [Theme], which [AnimatedTheme] uses to actually apply the interpolated /// * [Theme], which [AnimatedTheme] uses to actually apply the interpolated
......
...@@ -404,11 +404,20 @@ abstract class AnimatedWidgetBaseState<T extends ImplicitlyAnimatedWidget> exten ...@@ -404,11 +404,20 @@ abstract class AnimatedWidgetBaseState<T extends ImplicitlyAnimatedWidget> exten
/// [AnimatedWidget] such as the [DecoratedBoxTransition] or use your own /// [AnimatedWidget] such as the [DecoratedBoxTransition] or use your own
/// [AnimationController]. /// [AnimationController].
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_container.mp4}
///
/// See also: /// See also:
/// ///
/// * [AnimatedPadding], which is a subset of this widget that only /// * [AnimatedPadding], which is a subset of this widget that only
/// supports animating the [padding]. /// supports animating the [padding].
/// * The [catalog of layout widgets](https://flutter.io/widgets/layout/). /// * The [catalog of layout widgets](https://flutter.io/widgets/layout/).
/// * [AnimatedPositioned], which, as a child of a [Stack], automatically
/// transitions its child's position over a given duration whenever the given
/// position changes.
/// * [AnimatedAlign], which automatically transitions its child's
/// position over a given duration whenever the given [alignment] changes.
class AnimatedContainer extends ImplicitlyAnimatedWidget { class AnimatedContainer extends ImplicitlyAnimatedWidget {
/// Creates a container that animates its parameters implicitly. /// Creates a container that animates its parameters implicitly.
/// ///
...@@ -564,9 +573,15 @@ class _AnimatedContainerState extends AnimatedWidgetBaseState<AnimatedContainer> ...@@ -564,9 +573,15 @@ class _AnimatedContainerState extends AnimatedWidgetBaseState<AnimatedContainer>
/// Animated version of [Padding] which automatically transitions the /// Animated version of [Padding] which automatically transitions the
/// indentation over a given duration whenever the given inset changes. /// indentation over a given duration whenever the given inset changes.
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_padding.mp4}
///
/// See also: /// See also:
/// ///
/// * [AnimatedContainer], which can transition more values at once. /// * [AnimatedContainer], which can transition more values at once.
/// * [AnimatedAlign], which automatically transitions its child's
/// position over a given duration whenever the given [alignment] changes.
class AnimatedPadding extends ImplicitlyAnimatedWidget { class AnimatedPadding extends ImplicitlyAnimatedWidget {
/// Creates a widget that insets its child by a value that animates /// Creates a widget that insets its child by a value that animates
/// implicitly. /// implicitly.
...@@ -626,9 +641,18 @@ class _AnimatedPaddingState extends AnimatedWidgetBaseState<AnimatedPadding> { ...@@ -626,9 +641,18 @@ class _AnimatedPaddingState extends AnimatedWidgetBaseState<AnimatedPadding> {
/// Animated version of [Align] which automatically transitions the child's /// Animated version of [Align] which automatically transitions the child's
/// position over a given duration whenever the given [alignment] changes. /// position over a given duration whenever the given [alignment] changes.
/// ///
/// Here's an illustration of what this can look like, using a [curve] of
/// [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_align.mp4}
///
/// See also: /// See also:
/// ///
/// * [AnimatedContainer], which can transition more values at once. /// * [AnimatedContainer], which can transition more values at once.
/// * [AnimatedPadding], which can animate the padding instead of the
/// alignment.
/// * [AnimatedPositioned], which, as a child of a [Stack], automatically
/// transitions its child's position over a given duration whenever the given
/// position changes.
class AnimatedAlign extends ImplicitlyAnimatedWidget { class AnimatedAlign extends ImplicitlyAnimatedWidget {
/// Creates a widget that positions its child by an alignment that animates /// Creates a widget that positions its child by an alignment that animates
/// implicitly. /// implicitly.
...@@ -711,6 +735,10 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> { ...@@ -711,6 +735,10 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
/// frame of the animation, whereas [AnimatedPositioned] will trigger a relayout /// frame of the animation, whereas [AnimatedPositioned] will trigger a relayout
/// as well. /// as well.
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_positioned.mp4}
///
/// See also: /// See also:
/// ///
/// * [AnimatedPositionedDirectional], which adapts to the ambient /// * [AnimatedPositionedDirectional], which adapts to the ambient
...@@ -860,6 +888,10 @@ class _AnimatedPositionedState extends AnimatedWidgetBaseState<AnimatedPositione ...@@ -860,6 +888,10 @@ class _AnimatedPositionedState extends AnimatedWidgetBaseState<AnimatedPositione
/// frame of the animation, whereas [AnimatedPositionedDirectional] will trigger /// frame of the animation, whereas [AnimatedPositionedDirectional] will trigger
/// a relayout as well. ([SlideTransition] is also text-direction-aware.) /// a relayout as well. ([SlideTransition] is also text-direction-aware.)
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_positioned_directional.mp4}
///
/// See also: /// See also:
/// ///
/// * [AnimatedPositioned], which specifies the widget's position visually (the /// * [AnimatedPositioned], which specifies the widget's position visually (the
...@@ -982,6 +1014,10 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat ...@@ -982,6 +1014,10 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
/// Animating an opacity is relatively expensive because it requires painting /// Animating an opacity is relatively expensive because it requires painting
/// the child into an intermediate buffer. /// the child into an intermediate buffer.
/// ///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_opacity.mp4}
///
/// ## Sample code /// ## Sample code
/// ///
/// ```dart /// ```dart
...@@ -1016,6 +1052,11 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat ...@@ -1016,6 +1052,11 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState<Animat
/// } /// }
/// } /// }
/// ``` /// ```
///
/// See also:
///
/// * [FadeTransition], an explicitly animated version of this widget, where
/// an [Animation] is provided by the caller instead of being built in.
class AnimatedOpacity extends ImplicitlyAnimatedWidget { class AnimatedOpacity extends ImplicitlyAnimatedWidget {
/// Creates a widget that animates its opacity implicitly. /// Creates a widget that animates its opacity implicitly.
/// ///
...@@ -1083,6 +1124,10 @@ class _AnimatedOpacityState extends ImplicitlyAnimatedWidgetState<AnimatedOpacit ...@@ -1083,6 +1124,10 @@ class _AnimatedOpacityState extends ImplicitlyAnimatedWidgetState<AnimatedOpacit
/// ///
/// The [textAlign], [softWrap], [textOverflow], and [maxLines] properties are /// The [textAlign], [softWrap], [textOverflow], and [maxLines] properties are
/// not animated and take effect immediately when changed. /// not animated and take effect immediately when changed.
///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.elasticInOut].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_default_text_style.mp4}
class AnimatedDefaultTextStyle extends ImplicitlyAnimatedWidget { class AnimatedDefaultTextStyle extends ImplicitlyAnimatedWidget {
/// Creates a widget that animates the default text style implicitly. /// Creates a widget that animates the default text style implicitly.
/// ///
...@@ -1186,6 +1231,10 @@ class _AnimatedDefaultTextStyleState extends AnimatedWidgetBaseState<AnimatedDef ...@@ -1186,6 +1231,10 @@ class _AnimatedDefaultTextStyleState extends AnimatedWidgetBaseState<AnimatedDef
/// because it is being driven by an [AnimatedTheme]). /// because it is being driven by an [AnimatedTheme]).
/// ///
/// The [shape] is not animated. /// The [shape] is not animated.
///
/// Here's an illustration of what using this widget looks like, using a [curve]
/// of [Curves.fastOutSlowIn].
/// {@animation 250 266 https://flutter.github.io/assets-for-api-docs/assets/widgets/animated_physical_model.mp4}
class AnimatedPhysicalModel extends ImplicitlyAnimatedWidget { class AnimatedPhysicalModel extends ImplicitlyAnimatedWidget {
/// Creates a widget that animates the properties of a [PhysicalModel]. /// Creates a widget that animates the properties of a [PhysicalModel].
/// ///
......
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