Guest User

Untitled

a guest
Feb 15th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. _createUser() async {
  2. UserUpdateInfo updateInfo = UserUpdateInfo();
  3. updateInfo.displayName = _usernameController.text;
  4.  
  5. FirebaseUser user = await _auth
  6. .createUserWithEmailAndPassword(
  7. email: _emailController.text,
  8. password: _passwordController.text,
  9. )
  10. .then((user) {
  11. user.updateProfile(updateInfo);
  12. });
  13. print('USERNAME IS: ${user.displayName}');
  14. }
  15.  
  16. NoSuchMethodError: The getter 'displayName' was called on null.
Add Comment
Please, Sign In to add comment