I\'m having trouble with checking if my collections exists in Firestore database. When I was working with Firebase Realtime database i could have used:
if(databa
exists() applies to DocumentSnapshot while you're dealing with QuerySnapshot
exists()
DocumentSnapshot
QuerySnapshot
Call task.result for getting QuerySnapshot out of Task.
Task
From that, call result.getDocuments() and iterate through each of the DocumentSnapshot calling exists() on them.
result.getDocuments()