gesture_physics_animator library

Velocity-seeded spring physics for draggable widgets: real momentum, elastic boundary bouncing, and configurable damping — not tween-based "snap back" animation.

Classes

DraggableCard
A pre-configured GesturePhysicsAnimator for the common "swipe and release" card pattern: drag it anywhere, let go, and it springs back to where it started.
ElasticBoundedDraggable
A pre-configured GesturePhysicsAnimator for things like a draggable FAB or floating panel: confined to bounds, bouncing elastically off its edges, and — unlike DraggableCard — staying wherever it's dropped instead of springing back to its origin.
GesturePhysicsAnimator
Wraps child in a spring-backed, draggable element driven by real physics: the moment you let go, the element's motion continues from the velocity of your drag, simulated with a SpringSimulation (or, when snapBackToOrigin is false, a friction decay) — not a Tween that ignores how fast you were moving and just "snaps back."
GestureSpringController
Drives the settle animation for a 2-D, physics-based drag-and-release gesture: a velocity-seeded spring (or, when not snapping back, a friction decay) per axis, with optional elastic bouncing off a rectangular boundary.
SpringPresets
Named SpringDescription presets for GesturePhysicsAnimator-style widgets, so callers don't have to hand-tune raw mass / stiffness / damping numbers to get a physically sensible feel.