isAllEqualsInList function
Returns true
if list
elements are all equals to value
.
deep
IF true
checks deeply collections values.
Implementation
bool isAllEqualsInList(List? list, Object value, [bool deep = false]) {
if (list == null || list.isEmpty) return false;
for (var e in list) {
if (!isEquals(e, value, deep)) {
return false;
}
}
return true;
}