set method
Transaction
set(
- DocumentReference documentReference,
- Map<
String, dynamic> data, [ - SetOptions? options
Writes to the document referred to by the provided DocumentReference. If the document does not exist yet, it will be created. If you pass SetOptions, the provided data can be merged into the existing document.
Implementation
Transaction set(
DocumentReference documentReference, Map<String, dynamic> data,
[SetOptions? options]) {
assert(documentReference.firestore == _firestore,
'the document provided is from a different Firestore instance');
return Transaction._(
_firestore,
_delegate.set(documentReference.path,
_CodecUtility.replaceValueWithDelegatesInMap(data)!, options));
}