AuthProvider class

the provider that manage the authentication and auth changes

this provider need to be created in the main method - runApp method with the ChangeNotifierProvider

Inheritance

Constructors

AuthProvider(void initializeLoginState(AuthProvider))

Properties

authExceptionType AuthExceptionType?
an enum represents the firebase exception types based on exception codes.
getter/setter pair
authState AuthState
getter/setter pair
email String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initializeLoginState → void Function(AuthProvider)
checks the user is logged in or not and based on that updates the email and authState
final
isLoading bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userName String?
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
doLogout(AuthProvider authProvider, Future<void> logout(AuthProvider)) Future<void>
isAccountExistWithThis(String email, AuthProvider authProvider, Future<bool> checkEmail(String email, AuthProvider)) Future<bool>
loginWith(String email, String password, AuthProvider authProvider, Future<bool> login(String, String, AuthProvider)) Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
notifyListeners() → void
Call all the registered listeners.
inherited
registerWith(String email, String password, String name, AuthProvider authProvider, Future<bool> register(String, String, String, AuthProvider)) Future<bool>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
sendPasswordResetEmailFor(String email, AuthProvider authProvider, Future<bool> sendPasswordResetEmail(String, AuthProvider)) Future<bool>
toString() String
A string representation of this object.
inherited

Operators

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