first property

  1. @override
T first
override

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 => super.value.first;
  1. @override
void first=(T element)
override

Put the value at the first element.

Implementation

@override
set first(T element) {
  if (isEmpty) {
    throw RangeError.index(0, this);
  }
  this[0] = element;
}