NinjaUiIterableExtension<E> extension
An extension on Iterable that provides additional utility methods for handling nullable elements and performing common operations.
- on
-
- Iterable<
E?>
- Iterable<
Methods
-
magicAnd(
) → bool -
Available on Iterable<
ReturnsE?> , provided by the NinjaUiIterableExtension extensiontrueif all non-null elements in the iterable evaluate totruewhen converted to a bool. -
magicContains(
bool condition(E)) → bool -
Available on Iterable<
ReturnsE?> , provided by the NinjaUiIterableExtension extensiontrueif the iterable contains an element that matches the given condition. -
magicFilter(
bool condition(E)) → Iterable< E?> -
Available on Iterable<
Filters elements based on the given condition and returns a new iterable.E?> , provided by the NinjaUiIterableExtension extension -
magicFilterFalse(
) → List< E> -
Available on Iterable<
Returns a list of non-null elements in the iterable that evaluate toE?> , provided by the NinjaUiIterableExtension extensionfalsewhen converted to a bool. -
magicFilterTrue(
) → List< E> -
Available on Iterable<
Returns a list of non-null elements in the iterable that evaluate toE?> , provided by the NinjaUiIterableExtension extensiontruewhen converted to a bool. -
magicJoin(
{String delimiter = ', '}) → String -
Available on Iterable<
Joins the string representation of all elements into a single String with a specified delimiter.E?> , provided by the NinjaUiIterableExtension extension -
magicOr(
) → bool -
Available on Iterable<
ReturnsE?> , provided by the NinjaUiIterableExtension extensiontrueif any non-null element in the iterable evaluates totruewhen converted to a bool. -
magicProduct(
) → double -
Available on Iterable<
Computes the product of numeric elements in the iterable.E?> , provided by the NinjaUiIterableExtension extension -
magicSum(
) → double -
Available on Iterable<
Computes the sum of numeric elements in the iterable.E?> , provided by the NinjaUiIterableExtension extension -
magicToBooleans(
{bool defaultValue = false}) → List< bool> -
Available on Iterable<
Returns a list of elements converted to booleans by the magicBool method.E?> , provided by the NinjaUiIterableExtension extension -
magicToDoubles(
{double defaultValue = 0}) → List< double> -
Available on Iterable<
Returns a list of elements converted to doubles by the magicDouble method.E?> , provided by the NinjaUiIterableExtension extension -
magicToIntegers(
{int defaultValue = 0}) → List< int> -
Available on Iterable<
Returns a list of elements converted to integers by the magicInt method.E?> , provided by the NinjaUiIterableExtension extension -
magicToStrings(
{String defaultValue = ''}) → List< String> -
Available on Iterable<
Returns a list of elements converted to strings by the magicString method.E?> , provided by the NinjaUiIterableExtension extension