I need to retrieve data from Firestore to get "petName" of each document and then I used in dropdownbutton.
But problem is that I am not getting any field . I received only documents. As also show in output dropdownbutton.
>Solution :
you are using document you have to specify what exactly like as in your case you want petName so use that instead of using the whole document.
try:
snap.data()['petName']