-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Support SwiftUI's spring animation #152587
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Type
Projects
Status
Todo
Use case
The spring animation is used all over iOS, and is critical to building widgets with iOS look and feel. Although Flutter currently provides spring simulators, they're not directly usable as animation curves.
Proposal
The spring animation is introduced here: https://developer.apple.com/videos/play/wwdc2023/10158/
(Github backup)
Goals:
bounceanddurationmass,stiffness, anddampingdurationConvert(Wrong formula from Apple. We've figured out the right one):bounceanddurationto detailed parameters (from the video)Questions:
extraBounceis appliedextraBounceis directly added tobounce.settlingDurationis derived (we might not need it since our spring simulator allows a settling tolerance)