I am new to flutter and I can't get firebase updateProfile function work
I created a user through the console and tried to update the user info through code in flutter web application. I created userprofile instance:
UserProfile fbP = UserProfile();
fbP.displayName = "Youmna";
fbP.photoURL = "";
And passed it to updateProfile function:
authFB.currentUser.updateProfile(fbP);
--authFB is my Firebase.Auth attribute
And I reloaded the user
authFB.currentUser.reload();
And then I tried to print the display name, but it gave me null!
print(authFB.currentUser.displayName);
However I tried to print the email and it printed it correctly.
print(authFB.currentUser.email);
What shall I do, please?