SwipeToRemoveCallback typedef
A callback function that is called when an item is swiped for removal.
Implementations should remove the corresponding collection item at index.
final List<MyDataObject> items = <MyDataObject>[/* ... */];
void onSwipedToRemove(int index) =>
items.removeAt(index);
Implementation
typedef SwipeToRemoveCallback = void Function(int index);