Answers for "how to check if a field is null in firestore flutter"

1

how to check if a field is null in firestore flutter

// check if Document exist under a collection
  
 // -User
 //	  -UID
 //    	 -Name:'John'
      if (datasnapshot.exists) { //checking if UID exist
      		return true;
		}else{
        		return false;
        }
    
  // check if a key exit 
  
 // -User
 //	  -UID
 //    	 -Name:'John'
 
      if (documentSnapshot.get("Name") != null) {
       		retuns true;
      } else{
        return false // does not exist
      }
Posted by: Guest on March-04-2022

Code answers related to "how to check if a field is null in firestore flutter"

Browse Popular Code Answers by Language