BaiomyAuthRepo class

Properties

authStateChanges Stream<User?>
Stream that emits whenever the auth state changes (sign in / sign out).
no setter
currentUser → User?
no setter
hashCode int
The hash code for this object.
no setterinherited
isGuest bool
Returns true if the current user is anonymous (guest).
no setter
isSignedIn bool
Returns true if a user is currently signed in.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uid String?
Returns the current user's UID, or null if no user is signed in.
no setter

Methods

checkEmailVerification() Future<bool>
Reloads the current user's data from Firebase, then returns whether their email is verified.
checkOldPassword(String email, String password) Future<bool>
Re-authenticates the current user with email and password to verify their old password. Returns true if successful, false otherwise.
getAuthErrorMessage(FirebaseAuthException e) String
Maps any FirebaseAuthException code to a user-friendly message.
getUpgradeErrorMessage(FirebaseAuthException e) String
Maps a FirebaseAuthException code from an upgrade attempt to a user-friendly message.
logOut() Future<void>
Signs out the current user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reloadUserData() Future<void>
Reloads the current user's profile data from Firebase.
sendEmailVerification() Future<void>
Sends a verification email to the current user. Throws if no user is signed in or the request fails.
sendPasswordResetEmail(String email) Future<void>
Sends a password reset email to email. Throws FirebaseAuthException on failure — handle in the provider/caller.
signInAnonymously() Future<UserCredential>
Signs in anonymously (guest mode). Throws FirebaseAuthException on failure — handle in the provider/caller.
signInWithEmailAndPassword(String email, String password) Future<UserCredential>
Signs in an existing user with email and password. Throws FirebaseAuthException on failure — handle in the provider/caller.
signUpWithEmailAndPassword(String email, String password) Future<UserCredential>
Creates a new account with email and password. Throws FirebaseAuthException on failure — handle in the provider/caller.
toString() String
A string representation of this object.
inherited
updateUserName(String displayName) Future<void>
Updates the current user's display name.
updateUserPassword(String newPassword) Future<void>
Updates the current user's password. Throws FirebaseAuthException on failure — handle in the provider/caller.
upgradeGuestToUser({required String email, required String password, required String name, required String phone}) Future<void>
Upgrades an anonymous (guest) account to a permanent email/password account.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

auth → FirebaseAuth
final
instance BaiomyAuthRepo
final