I use getDocData function for get one document.
Future getDocData(String docPath) async {
try {
print(docPath);
final response = await fireStore.doc(docPath).get();
return response.data();
} catch (e) {
throw UnimplementedError(e.toString());
}
}
After i got document i updated same document with updateDocument function.
Future updateDocument<T>(docPath, docField, data) async {
try {
return await fireStore.doc(docPath).set(
{docField: data},
SetOptions(
merge: true,
),
);
} catch (e) {
throw UnimplementedError(e.toString());
}
}
when operation done. i expect on firebase usage dasboard one read and one write operation happen but I see two read and one write operation.Is there anyway solve this issue or is it okay?