letsar / flutter_slidable

A Flutter implementation of slidable list item with directional slide actions.
MIT License
2.73k stars 591 forks source link

Slidable widget not closing properly #477

Closed jostinakkara closed 6 months ago

jostinakkara commented 6 months ago

The Slidable Widget was working fine when I stayed in the same page and tried to open and close the widget. But when I open the slidable and then navigate to another page upon clicking the Slidable(Slidable widget is wrapped around a Gesturedetector) and then navigate back and close the widget by dragging, the widget is not closing properly. The SlidableAction widgets gets removed but the size of the Slidable widget remains the same as it was when opened(as specified using the extendratio property).The widget closes properly when rebuild/scroll but without rebuilding it stays the same.This issue was seen in the emulator although I am not sure if it is the same when running on a actual device.

jostinakkara commented 6 months ago

I found a temporary solution. I replaced the child of Slidable widget from ListTile to a Container widget and the issue was gone. Looks like Listtile widget has some issues with rebuilding.