getAnimation<T> function

Animation<T> getAnimation<T>(
  1. T start,
  2. T end,
  3. AnimationController controller, {
  4. Curve curve = Curves.linearToEaseOut,
})

Get the animation simply.

Get the curved Animation object conveniently from start, end value drove by the controller.

Implementation

Animation<T> getAnimation<T>(
  T start,
  T end,
  AnimationController controller, {
  Curve curve = Curves.linearToEaseOut,
}) {
  return controller
      .drive(Tween<T>(begin: start, end: end).chain(CurveTween(curve: curve)));
}