updateWhere method
Updates items from current list, checked by condition
and updated by replace
.
Implementation
void updateWhere(bool Function(T item) condition, void Function(T item) update, {int count = -1}) {
var updated = 0;
for (var i = 0; i < length; i++) {
if (condition(this[i])) {
update(this[i]);
updated++;
if (count >= 1 && updated >= count) {
return; // given count is valid && updated count reaches limit
}
}
}
}