AbstractBlocListExtensions<T> extension
Extension methods for non-nullable lists of type T.
- on
-
- List<
T>
- List<
Methods
-
addIf(
bool condition, T element, [dynamic callbackIfTrue(T)?]) → void -
Available on List<
Adds an element to the list if the specified condition is true. Optionally, a callback can be executed if the element is added.T> , provided by the AbstractBlocListExtensions extension -
firstOrDefault(
[bool test(T element)?]) → T? -
Available on List<
Returns the first element in the list that satisfies the optional test function. If the test function is not provided, it returns the first element or null.T> , provided by the AbstractBlocListExtensions extension -
removeLastItems(
int amount) → void -
Available on List<
Removes the lastT> , provided by the AbstractBlocListExtensions extensionamount
of items from the list. -
toggle(
T element, [bool test(T element)?]) → int -
Available on List<
Toggles the presence of an element in the list based on an optional test function. Returns -1 if the element was removed, and 1 if it was added.T> , provided by the AbstractBlocListExtensions extension