lastIndex property

int lastIndex

Returns the index of the last item in the list or -1 if the list is empty.

Implementation

int get lastIndex => size - 1;