addItem method

  1. @override
FollowingDashboardModel addItem(
  1. FollowingDashboardModel model,
  2. MemberActionModel newItem
)
override

Implementation

@override
FollowingDashboardModel addItem(
    FollowingDashboardModel model, MemberActionModel newItem) {
  List<MemberActionModel> newItems = model.memberActions == null
      ? []
      : model.memberActions!.map((e) => e).toList();
  newItems.add(newItem);
  var newModel = model.copyWith(memberActions: newItems);
  return newModel;
}