September 2019
Beginner
512 pages
12h 52m
English
The Firebase user object contains more than phone numbers, it contains a set of information for another method of login, such as email, for example, and also contains properties that help to define the user's profile, such as a display name and photo URL. Here, in the last step of the login process, we can save the user profile with its displayName so that other users can identify easily. This is done in the _saveProfile() method as shown here:
// part of LoginPageState classvoid _saveProfile() async { setState(() { _showProgress = true; }); final user = await FirebaseAuth.instance.currentUser(); final updateInfo = UserUpdateInfo(); updateInfo.displayName = _displayName; await user.updateProfile(updateInfo); ...Read now
Unlock full access