first property
Returns the first element.
Throws a StateError if this
is empty.
Otherwise returns the first element in the iteration order,
equivalent to this.elementAt(0)
.
Implementation
@override
T get first => value.first;
Put the value at the first element
.
Implementation
@override
set first(T element) {
if (isEmpty) {
throw RangeError.index(0, this);
}
this[0] = element;
}