replace method
Replaces the document at docId
with value
.
If no document exists yet, the replace will fail silently.
Requires 1 read of doc to perform replace
Implementation
@override
Future<void> replace({
required DocumentId docId,
required T value,
}) async {
final existingDoc = await read(docId);
if (existingDoc == null) return;
await ref.doc(docId.docId).set(value);
return;
}