身份验证颤动后的更新配置文件

时间:2021-02-27 20:20:39

标签: flutter firebase-authentication

我是flutter的新手,我无法弄清楚如何在电子邮件和密码身份验证后添加要添加的新配置文件,我已经通过应用网络上的一些建议进行了一些尝试和错误,但它不断得到尝试打印结果的空结果。 这是代码(请原谅我的英语基础)

             onPressed: () {
              FirebaseAuth.instance
                  .createUserWithEmailAndPassword(
                      email: _email, password: _password)
                  .then((signedInUser) async {
                User user = FirebaseAuth.instance.currentUser;
                await user.updateProfile(displayName: _nickName);
                await user.reload().then((value) {
                  print("${user.displayName}");
                });
              }).catchError((e) {
                print(e);
              });
            },

0 个答案:

没有答案