notEmptyOrNull property

List<T>? get notEmptyOrNull

Returns self, if it's not empty, null otherwise.

Implementation

List<T>? get notEmptyOrNull => isNotEmpty ? this : null;