NIB / PLAYGROUND
Bounded drag and snap back — Flutter animation playground
Directly move an object inside a measured range. Let users move an object without losing it outside its useful area.
Open interactive viewDirectly move an object inside a measured range.
Let users move an object without losing it outside its useful area.
Try the interaction
Drag the puck
Read the guide and example code
Controls
| Setting | Group | Range | Initial |
|---|---|---|---|
| Drag radius | INTERACTION | 40.0–120.0 | 80.0 |
| Stiffness | SPRING PHYSICS | 80.0–420.0 | 180.0 |
| Damping | SPRING PHYSICS | 6.0–45.0 | 18.0 |
| Mass | SPRING PHYSICS | 0.4–2.5 | 1.0 |