From 96276630bf7364e8152f082da3feed1bdb4864e2 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 9 Oct 2019 16:31:29 -0700 Subject: [PATCH] Improve documentation around animations. (#42267) --- packages/flutter/lib/src/animation/animation_controller.dart | 4 ++++ packages/flutter/lib/src/physics/spring_simulation.dart | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart index 29d0fa56ebc..0b473341639 100644 --- a/packages/flutter/lib/src/animation/animation_controller.dart +++ b/packages/flutter/lib/src/animation/animation_controller.dart @@ -673,6 +673,10 @@ class AnimationController extends Animation /// Drives the animation according to the given simulation. /// + /// The values from the simulation are clamped to the [lowerBound] and + /// [upperBound]. To avoid this, consider creating the [AnimationController] + /// using the [new AnimationController.unbounded] constructor. + /// /// Returns a [TickerFuture] that completes when the animation is complete. /// /// The most recently returned [TickerFuture], if any, is marked as having been diff --git a/packages/flutter/lib/src/physics/spring_simulation.dart b/packages/flutter/lib/src/physics/spring_simulation.dart index 660394f3905..066d35cb269 100644 --- a/packages/flutter/lib/src/physics/spring_simulation.dart +++ b/packages/flutter/lib/src/physics/spring_simulation.dart @@ -122,8 +122,8 @@ class SpringSimulation extends Simulation { String toString() => '$runtimeType(end: $_endPosition, $type)'; } -/// A SpringSimulation where the value of [x] is guaranteed to have exactly the -/// end value when the simulation isDone(). +/// A [SpringSimulation] where the value of [x] is guaranteed to have exactly the +/// end value when the simulation [isDone]. class ScrollSpringSimulation extends SpringSimulation { /// Creates a spring simulation from the provided spring description, start /// distance, end distance, and initial velocity.