我在代码中得到了这个异常。在“Future<DocumentSnapshot<Map<String,dynamic>>> Function([GetOptions?])',它不是'Future'的子类型
var firebaseuid = FirebaseAuth.instance.currentUser?.uid; DocumentSnapshot userdoc =(await usercollection.doc(firebaseuid).get)as DocumentSnapshot<Object?>; var alldocs = videoscollection.get();
我试图删除wait,但没有工作。
1条答案
按热度按时间gt0wga4j1#
您错过了usercollection.doc(firebaseuid).get()中的parantheses
var firebaseuid = FirebaseAuth.instance.currentUser?.uid; DocumentSnapshot userdoc =(await usercollection.doc(firebaseuid).get())作为DocumentSnapshot<Object?>; var alldocs = videoscollection.get();