lastOrOption method

Option<T> lastOrOption()

Returns the last element of an iterator, None if empty.

Implementation

@pragma('vm:prefer-inline')
Option<T> lastOrOption() => Option.from(lastOrNull);