assign method

void assign(
  1. E item
)

Replaces the list with a single item.

Implementation

void assign(E item) {
  _value
    ..clear()
    ..add(item);
  refresh();
}