AuthenticationProvider 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
-
- Object
- ChangeNotifier
- AuthenticationProvider
Constructors
- AuthenticationProvider(void initializeLoginState(AuthenticationProvider))
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(AuthenticationProvider)
-
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(
AuthenticationProvider authProvider, Future< void> logout(AuthenticationProvider)) → Future<void> - logout
-
isAccountExistWithThis(
String email, AuthenticationProvider authProvider, Future< bool> checkEmail(String email, AuthenticationProvider)) → Future<bool> -
check whether any account exist with the
email
-
loginWith(
String email, String password, AuthenticationProvider authProvider, Future< bool> login(String, String, AuthenticationProvider)) → Future<bool> -
login with
email
andpassword
-
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, AuthenticationProvider authProvider, Future< bool> register(String, String, String, AuthenticationProvider)) → Future<bool> -
register with
email
,password
,name
-
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, AuthenticationProvider authProvider, Future< bool> sendPasswordResetEmail(String, AuthenticationProvider)) → Future<bool> -
sends a password reset email to the provided
email
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited