In order to set new data in a Firestore document, I normally use setData() with merge: true. This works fine and as intended regarding data saving:
await userDoc.reference.setData({
'favourite_color': 'blue',
'favourite_team': 'fcporto',
},merge: true);
My only issue is that DocumentSnapshot (userDoc in this example) doesn't get automatically 'refreshed' after setData is finished, which forces me to do an additional query to the document.
Is there any way to automatically update DocumentSnapshot after setData() ? (same behaviour happens with updateData())