Merging set calls using transactions is currently not possible in Flutter because we don't have a SetOptions class and parameter for the set() method.
However, the docs stay otherwise:
/// 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.
@Ehesp Could that merging workaround be implemented on the backend using the .onWrite() hook in a Cloud Function, since that function has both the pre and post versions of the document available to it?
Hey, as part of our on-going work for #2582, support for SetOptions on Transaction.set has been added in our Firebase Firestore rework (#2913) - which has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you