In the majority of the Dismissible examples provided by Flutter, they are dismissing items within a ListView. For example, this.
What I am currently doing is this:
The error message is pretty clear.
Make sure to implement the onDismissed handler and to immediately remove the Dismissible widget from the application once that handler has fired.
An empty function is not enough. Once an item has been dismissed, that widget has to be removed from the widget tree. Which means that you must remove the Dismissible
from your ListView
.