小编Jak*_*kob的帖子

如何将 displayName 添加到 Firebase 用户?(颤振/飞镖)

我可以使用 Firebase 身份验证保存电子邮件和密码。我还使用 Cloud Firestore 保存了这些信息。但是如何在注册后添加和保存displayName呢?

我的代码:

Future registerWithEmailAndPassword(String email, String password) async {
try {
  AuthResult result = await _auth.createUserWithEmailAndPassword(
      email: email, password: password);
  FirebaseUser user = result.user;

  // create a new document for the user with the uid
  await DatabaseService(uid: user.uid)
      .updateUserData('User', user.email, 'test.de/test.png', user.uid);
  return _userFromFirebaseUser(user);
} catch (e) {
  print(e.toString());
  return null;
}
Run Code Online (Sandbox Code Playgroud)

}

注册表单按钮:

onPressed: () async {
  if (_formKey.currentState.validate()) {
    setState(() => loading = true);
    dynamic result = await _auth
        .registerWithEmailAndPassword(
            email, …
Run Code Online (Sandbox Code Playgroud)

dart firebase firebase-authentication flutter

4
推荐指数
2
解决办法
3049
查看次数

删除容器之间的线(颤振/飞镖)

单击查看示例图像: 示例

我怎样才能删除这些线?我已经使用过 BoxDecoration()

例如

Container(
            decoration: BoxDecoration(
              color: Colors.white,
            ),
            height: 70,
            child: Align(
              alignment: Alignment(-0.85, 0.5),
              child: Text(
                'Anmeldung',
                style: TextStyle(
                  fontFamily: 'Roboto Bold',
                  fontSize: 30,
                ),
              ),
            ),
          ),
Run Code Online (Sandbox Code Playgroud)

一切都在 Scaffold() 中。

该容器放置在一个列小部件中。

有没有可能?

android ios dart flutter

2
推荐指数
1
解决办法
3561
查看次数

标签 统计

dart ×2

flutter ×2

android ×1

firebase ×1

firebase-authentication ×1

ios ×1