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
}