secondLast property
T
secondLast
Returns the second last element of the list.
Equivalent to theList[theList.length - 2]
.
Throws a StateError if the list doesn't have a second last element.
Implementation
T get secondLast => _getElement('secondLast', length - 2);
void
secondLast=(T value)
Updates the second last position of the list to contain value
.
Equivalent to theList[theList.length - 2] = value
.
Throws a StateError if the list doesn't have a second last element.
Implementation
void set secondLast(T value) => _setElement('secondLast', length - 2, value);