update method
Updates an item.
Implementation
@override
void update(Key key, T newItem, {bool merge = false}) {
final oldItem = findByKey(key);
if (oldItem == null) return;
final oldBounds = logic.getBounds(oldItem);
final newBounds = logic.getBounds(newItem);
// Incremental Update
_itemCache[key] = newItem;
spatialIndex.update(key, newItem, oldBounds, newBounds);
perform(logic.createUpdateOp(oldItem, newItem), merge: merge, notify: true);
_emit(ItemUpdated(oldItem, newItem));
scheduleAutoSave();
}