I am learning to use firestore in flutter following Net Ninja\'s tutorial on youtube. After user authenticatin was done this guy added user records to the database whenever
Firestore's data used to be a property of QueryDocumentSnapshot, but now it is a function, data().
And, as the error message suggests, what you are dealing with is indeed a MapFunction(), i.e. a function that returns a map.
So, simply add empty parentheses to call the function data:
doc.data()['name']