ListResultExtensions<T, E> extension

Extensions for ListResult

on

Properties

firstOrNull → T?
Returns the list if it is success null otherwise
no setter
lengthOrNull int?
Returns the length of the list if it is success null otherwise
no setter

Methods

firstWhereOrNull(bool predicate(T)) → T?
Returns the first value in the list if it is success null otherwise
takeOrNull(int i) Iterable<T>?
Returns the first n elements of the list if it is success or null
whereOrNull(bool predicate(T)) Iterable<T>?
Returns the filtered elements of the list if it is success or null