replaceWhere method
Replaces all items that matches where with newData
Implementation
void replaceWhere(bool Function(T) where, T newData, {int? count}) {
final replaceCount = count ?? length;
var currentReplaceCount = 0;
for (var i = 0; i < length; ++i) {
if (where(this[i])) {
this[i] = newData;
++currentReplaceCount;
}
if (currentReplaceCount >= replaceCount) break;
}
}