Read page as text

NIB / PLAYGROUND

Drag to snap targets — Flutter animation playground

Release near a stop and the object finds the closest target. Help a freely moved object land on a useful discrete choice.

Open interactive view

Release near a stop and the object finds the closest target.

Help a freely moved object land on a useful discrete choice.

Try the interaction

Drag toward either stop

Read the guide and example code

Controls

SettingGroupRangeInitial
Snap distanceINTERACTION50.0–130.095.0
StiffnessSPRING PHYSICS80.0–420.0180.0
DampingSPRING PHYSICS6.0–45.018.0
Edge elasticityINTERACTION0.0–0.50.2