GIfatahTH / animator

A Flutter library that makes animation easer. It allows for separation of animation setup from the User Interface.
BSD 3-Clause "New" or "Revised" License
227 stars 28 forks source link

Start Animation by using Animator State #24

Closed GensaGames closed 4 years ago

GensaGames commented 4 years ago

Problem. There is no way to update particular Widget at specific time and specific direction.

Workaround. To animate item in specific time to specific direction we need to save last Animation value provided by Animator and set parameter resetAnimationOnRebuild to true. Then based on previous saved value decide direction for next animation and recreate entire Widget with Animator. This all in order to play it.

Consider. Allow to retrieve some contract (interface) fromAnimator (probably via GlobalKey). In order to call simple functions with animation (forward, start, reverse,) to particular direction.