add method

void add(
  1. E item
)

Add an item to the list.

Implementation

void add(E item) {
  emit([...val, item]);
}