firstOrOption method

Option<T> firstOrOption()

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

Implementation

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