I finished a block of code that performs 1 write and I noticed that while I did that the app did 16 reads. Is there a fast way for me to see what is causing these reads besides going line by line through my whole app?
The code that does the write is below.
void createGroupFS(String groupName) async {
final String timestamp = DateTime.now().millisecondsSinceEpoch.toString();
final currentUID = getUID();
final currentUsername = await getUsernameFS();
//Create Firestore records, one for the groups collection and one for the groups_UID collection
FirebaseFirestore firestore = FirebaseFirestore.instance;
CollectionReference groupsCollection = firestore.collection('groups');
final docRef = groupsCollection.doc();
await docRef.set({
'adminUID': currentUID,
'adminUsername': currentUsername,
'createDate': timestamp,
'groupID': docRef.id,
'groupName': groupName,
}).then((value) => print('##MyApp## database createGroupFS groups record added'))
.catchError((error) => print('##MyApp## database createGroupFS ERROR: ' + error.toString()));
}