createOrUpdate method

  1. @override
Future<void> createOrUpdate(
  1. ItemWithId input
)
override

Creates an item if it doesn't exist, or updates it if it does.

Implementation

@override
Future<void> createOrUpdate(ItemWithId input) async {
  final path = _getItemPath(input.toItemId());
  await _workDbInternal.writeFile(path, Item(item: input.item));
  await _enforceCollectionLimit(input.collection);
}