Fun Animations in Flutter

Animation class

This class basically provides the progressive values of the parameter of type double / Size / BorderRadius / Shape / Color … (Animation is itself a class with generic value Animation<T>). This class only holds the animation value and doesn't deal with UI frames.

  • Records the current value of the property being animated.
  • Records the current status of animation (eg Currently running, Stopped, etc.)

Animation Controller

The animation Controller is the controller for the specific animation that is implemented. This takes two important parameters first DURATION the time for which the animation should be performed and secondly the vsync which is configured with Ticker Provider of the class this controller is being implemented. Ticker gets registered with the SchedulerBinding and fires a callback every frame. This controller produces values that range from 0.0 (Starting Point For Animation ) to 1.0 ( Point where animation gets completed) in the duration provided. It is the work of this controller to kick the animation to play.

  • Records the duration of the animation.
  • Start, Stop, restart, reverse, etc

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store