return StreamBuilder(
stream: usersRef.doc(post.userId).snapshots(),
builder: (context, snapshot) {
if (snapshot.hasData) {
DocumentSnapshot snap = snapshot.data;
UserModel user = UserModel.fromJson(snap.data()!);
Hello, all. The 'snapshot.data' is giving me the above error, Please, help! Thanks!
Do DocumentSnapshot snap = snapshot.data as DocumentSnapshot;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.