getFirstIfExist method

T? getFirstIfExist()

First item, or null when empty.

Implementation

T? getFirstIfExist() => isEmpty ? null : first;