remove method

bool remove(
  1. E item
)

Remove an item from the list.

Implementation

bool remove(E item) {
  final newList = List<E>.from(val);
  final removed = newList.remove(item);
  if (removed) emit(newList);
  return removed;
}