anyTrue property
bool
get
anyTrue
Checks if any element in the iterable is true.
This getter iterates through each element in the iterable. If it
encounters an element that is true, it returns true. If no such
element is found after iterating through all elements, it returns
false.
Returns:
trueif at least one element in the iterable istrue.falseif no elements in the iterable aretrueor the iterable is empty.
Implementation
bool get anyTrue => where((bool e) => e).isNotEmpty;