updateItem method
Implementation
T updateItem(T oldItem, T Function(T old) call, [bool updateUi = false]) {
final int index = array.indexOf(oldItem);
final T newItem = call(get(index));
array = array.replace(index, newItem);
if (updateUi) {
setState();
}
return newItem;
}