removeItemById<T> function
Implementation
ThunkAction<SwipeFeedState<T>> removeItemById<T>(String id, String Function(T) objectKey){
return (Store<SwipeFeedState<T>> store) async {
List<Tuple2<T?, Store<SwipeFeedCardState>>> items = store.state.items;
if(items.isNotEmpty && id == objectKey(items[0].item1!)){
items.remove(0);
if(items.isNotEmpty){
items[0].item2.dispatch(SetSwipeFeedCardState(SwipeCardShowState()));
}
store.dispatch(SetItemsEvent(items));
}
};
}