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 => length - 1;