【发布时间】:2021-12-28 12:36:51
【问题描述】:
这里是代码
static void getCurrentOnlineUserInformation()async{
User user = _firebaseAuth.currentUser;
String userid = user.uid;
DatabaseReference reference = FirebaseDatabase.instance.ref().child('userProfile');
reference.child(userid).once().then((DataSnapshot dataSnapshot){
}
);
}
但它没有获取 DataSnapShot
错误 错误:无法将参数类型“Null Function(DataSnapshot)”分配给参数类型“FutureOr Function(DatabaseEvent)”。 (argument_type_not_assignable 在 [themovers] lib\assistants\assistantmethods.dart:86)
它一次又一次地获得空值
【问题讨论】:
标签: android ios flutter dart snapshot