我可以使用 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) 单击查看示例图像: 示例
我怎样才能删除这些线?我已经使用过 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() 中。
该容器放置在一个列小部件中。
有没有可能?