add method

void add(
  1. T elem
)

Add an element at the end of the List held in this cell.

NOTE: This method does not modify the underlying list but creates a new list with the element added at the end.

Implementation

void add(T elem) {
  final elements = List<T>.from(value);
  elements.add(elem);
  value = elements;
}