flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

Configure slidables duration and curve

Open x1z7 opened this issue 3 years ago • 1 comments

Hey @letsar 👋

Considering you took the route of handling internally different interactions between slidables with the help of SlidableAutoCloseBehavior, how could one configure the duration and curve when opening and closing slidables ?

I would expect that no matter how the user is interacting with the slidables they should use the same animation curve and duration, even if the logic comes from the use of closeWhenOpened /closeWhenTapped set to true.

I would expect that both the duration and curve would be configurable. Am I missing something?

x1z7 avatar Jan 10 '22 23:01 x1z7

For the moment you can't, but you're right, one should be able to configure this. Instead of using bu default _defaultMovementDuration and _defaultCurve, we should provide the duration and curve to the Slidable which would set them in the SlidableController. Feel free to add a PR if you have time, in the meanwhile I will add an Enhancement label. Thanks for the issue.

letsar avatar Jul 10 '22 14:07 letsar