onItemRemoved method

  1. @override
void onItemRemoved(
  1. User item,
  2. List<User> updatedList
)
override

Called when an item is removed from the list. Override this method to add custom logic after item removal.

item - The item that was removed updatedList - The list after the item was removed

Implementation

@override
void onItemRemoved(User item, List<User> updatedList) {
  _mapNeedsRebuild = true;
  if (!isClosed) {
    add(_ListStateChanged(users: updatedList, isEmpty: updatedList.isEmpty));
  }
}