firstOrNull property

T? get firstOrNull

Returns the list if it is success null otherwise

Implementation

T? get firstOrNull => match(
      onSuccess: (list) => list.isNotEmpty ? list.first : null,
      onError: (e) => null,
    );