replace method
Replaces first item in List for given test
Implementation
bool replace(T item, Predicate<T> test, [bool notify = true]) {
final index = _list.indexWhere(test);
final replace = index >= 0;
if (replace) {
_list.removeAt(index);
_list.insert(index, item);
if (notify) {
this.notify();
}
}
return replace;
}