deleteItem method

  1. @override
FollowRequestsDashboardModel deleteItem(
  1. FollowRequestsDashboardModel model,
  2. MemberActionModel deleteItem
)
override

Implementation

@override
FollowRequestsDashboardModel deleteItem(
    FollowRequestsDashboardModel 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;
}