firstOrNull property

T? firstOrNull

Returns first element or null otherwise

Implementation

T? get firstOrNull => this.isNullOrEmpty() ? null : this!.first;