Sprung is an easy-to-consume Curve that uses real physics equations to drive your animations.

Easy to consume #

AnimatedContainer( /// Critically damped by default curve: Sprung(), /// ... ),

AnimatedContainer( /// Easily adjust damping value curve: Sprung(16), /// ... ),

AnimatedContainer( /// Build a custom spring curve: Sprung( damping: 20, stiffness: 180, mass: 1.0, ), /// ... ),

Sprung has three opinionated curves, Sprung.underDamped , Sprung.criticallyDamped , and Sprung.overDamped .

AnimatedContainer( curve: Sprung.underDamped, /// ... ),

Based on Physics #

Using Flutter's physics engine which leverages Newton's Second Law of Motion, Hooke's Law, and velocity based damping, we implement the following equation to create realistic spring animations.

Believable motion #

Reliable accuracy #