Open Bonsai11 opened 3 years ago
I think what you want can be achieved using this package https://github.com/letsar/flutter_slidable. Please confirm if this matches your use case. 😄
I think what you want can be achieved using this package https://github.com/letsar/flutter_slidable. Please confirm if this matches your use case. 😄
That might be but I would rather see such features in the official widget instead of forcing people to add another dependency to their projects. If Flutter didn't have a Dismissible widget already, then using an externel package should be okay.
They should definitely add support for fixed length slidable.
is there any workaround for this?
Use case
Currently, the Dismissible widget can be swiped the complete width, completely hiding the swiped item. Having the possiblity to set some kind of limit, similar to dismissThresholds but as a maximum, makes it possible to show the background widget while still seeing part of the to be dismissed item.
Proposal
Just like dismissThresholds, add something like a dismissLimits parameter where you can specify a maximum for each DismissDirection, which prevents the animition to go the full width but instead to a user chosen percentage. In my case, you would only be able to swipe to about 20%, showing a delete icon in the background followed by a dialog to confirm the delete.