我有一个页面,我使用电子邮件n密码登录用户。此后,根据将返回的user.uid
,我说page_one或page_two。 signInWithEmailAndPassword()
方法返回null if email and password has some error
,否则返回user uid
,所以我做了这样的事情:
if(user.uid != null){
//home page
page_one;
}
else if (user.uid == null){
//error page
page_two;
}
我遇到的问题是,是否I sign in with correct email and password or not
会将我推向page_two
,然后on back press
它会向我发送to page_one
,直到有no route/navigation between them