Search code examples
flutterdartflutter-layout

Multiple onDismissed functions for one Dimissible widget


I was wondering if it is possible to have a Dismissible widget which does one thing if dragged for less than 25% of the screen and does something else if dragged more than 25% of the screen.

In the example below the first onDismissed function would trigger if the tile was dismissed in the red part and the other onDismissed function would trigger if it was dismissed in the grey part.

enter image description here


Solution

  • No, we don't have any widget like that you want.

    You have to create what you want with GestureDetector()