User class
Represents a user.
This class holds user data and provides methods to update profile, password, etc.
Constructors
- User({required dynamic user, required IdTokenResult accessToken, required dynamic refreshToken, required FusabaseAuth auth})
- Constructs a User.
Properties
- displayName → String?
-
Gets the display name.
no setter
- email → String?
-
Gets the email.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnonymous → bool
-
Gets if the user is anonymous.
no setter
- metadata → UserMetadata
-
Gets the metadata.
no setter
- phoneNumber → String?
-
Gets the phone number.
no setter
- photoURL → String?
-
Gets the photo URL.
no setter
-
providerData
→ List<
UserInfo> -
Gets the provider data.
no setter
- refreshToken → String?
-
Gets the refresh token.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tenantId → String?
-
Gets the tenant ID.
no setter
- uid → String
-
Gets the UID.
no setter
Methods
-
getIdToken(
[bool forceRefresh = false]) → Future< String?> - Gets the ID token quickly without refresh.
-
getIdTokenResult(
[bool forceRefresh = false]) → Future< IdTokenResult> - Gets the ID token result.
-
linkWithCredential(
AuthCredential credential) → Future< UserCredential> - Links the user account with the given credentials.
-
linkWithPopup(
AuthProvider provider) → Future< UserCredential> - Links the user account with a popup-based OAuth flow.
-
linkWithRedirect(
AuthProvider provider) → Future< void> - Initiates linking the user account with a redirect-based OAuth flow.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → Future< void> - Reloads the user data.
-
sendEmailVerification(
[ActionCodeSettings? actionCodeSettings]) → Future< void> - Sends email verification.
-
toString(
) → String -
Returns a string representation of the user.
override
-
unlink(
dynamic providerId) → Future< User> - Unlinks the user from a provider.
-
updateDisplayName(
String? displayName) → Future< void> - Updates the display name.
-
updatePassword(
String oldPassword, String newPass) → Future< void> - Updates the user's password.
-
updatePhoneNumber(
String? phoneNumber) → Future< void> - Updates the phone number.
-
updatePhotoURL(
String? photoURL) → Future< void> - Updates the photo URL.
-
updateProfile(
{String? displayName, String? photoURL}) → Future< void> - Updates the profile.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited