secondOrNull property

T? get secondOrNull

Element at index 1, or null if length < 2.

Implementation

T? get secondOrNull => length > 1 ? this[1] : null;