我需要更新这个代码,我不知道怎么做。有人知道吗?
_initialize() async{
SharedPreferences prefs = await SharedPreferences.getInstance();
bool loggedIn = prefs.getBool(LOGGED_IN) ?? false;
if(!loggedIn){
_status = Status.Unauthenticated;
}else{
await auth.currentUser().then((currentUser) async{
_user = currentUser;
_status = Status.Authenticated;
_userModel = await _userServices.getUserById(currentUser.uid);
});
}
notifyListeners();
}
1条答案
按热度按时间ijxebb2r1#
“currentUser”不再是方法,而是属性。