If I have a Firebase Firestore database which I have retrieved a DocumentSnapshot
for the document corresponding to the collection on the right and stored in a
you can use get
method to get value of a field
String username = (String) document.get("username"); //if the field is String
Boolean b = (Boolean) document.get("isPublic"); //if the field is Boolean
Integer i = (Integer) document.get("age") //if the field is Integer
checkout the doc for DocumentSnapshot