deleteItem method
FollowingDashboardModel
deleteItem(
- FollowingDashboardModel model,
- MemberActionModel deleteItem
override
Implementation
@override
FollowingDashboardModel deleteItem(
FollowingDashboardModel model, MemberActionModel deleteItem) {
var newItems = <MemberActionModel>[];
for (var item in model.memberActions!) {
if (item != deleteItem) {
newItems.add(item);
}
}
var newModel = model.copyWith(memberActions: newItems);
return newModel;
}