Hi there, I'm stuck, I tryed almost anything to make this work, only thin I want to do is query for a document exists in a collection;
final FirebaseFirestore db = FirebaseFirestore.instance; db.collection('users_chat').doc(documentid).get().then((doc) { print(doc.data()); print(documentid); print(doc.exists); return doc.exists; });
sorry for the prints, but they work and give me the right results, but a) Test Function gives an error about Error: 'FirebaseFirestore' isn't a type. final FirebaseFirestore db = FirebaseFirestore.instance;
and if I want to use the result as a bool for conditional button it never goes to True if the default is False
Why I want to query is xxxx_xxxxx document ID exists in a collection, to switch a button from Invite to chat to Go to Chat