I have a collection called company. All the companies are going to be stored like in my screenshot.
company
When I add another company, I want
final QuerySnapshot result = await Firestore.instance.collection('users').where('nickname', isEqualTo: nickname).getDocuments(); final List < DocumentSnapshot > documents = result.documents; if (documents.length > 0) { //exists } else { //not exists }