AuthFlow<T extends AuthProvider<AuthListener, AuthCredential>> class

A class that provides a current auth state given an AuthProvider and implements shared authentication process logic.

Should be rarely used directly, use available implementations instead:

See AuthFlowBuilder docs to learn how to wire up the auth flow with the widget tree.

Inheritance
Implemented types
Implementers

Constructors

AuthFlow({required AuthState initialState, required T provider, FirebaseAuth? auth, AuthAction? action})
A class that provides a current auth state given an AuthProvider and implements shared authentication process logic.

Properties

action AuthAction
An authentication action to perform.
getter/setter pairoverride-getter
auth ↔ FirebaseAuth
The FirebaseAuth instance used to perform authentication against. By default, FirebaseAuth.instance is used.
getter/setter pairoverride-getter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialState AuthState
An initial auth state. Usually Uninitialized, but varies for different auth flows.
final
onDispose VoidCallback
/// A callback that is being called when auth flow is complete and is being desposed (e.g. when AuthFlowBuilder widget is unmounteed from the widget tree).
getter/setter pair
provider → T
Current AuthProvider that is being used to authenticate the user.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value AuthState
The current value stored in this notifier.
getter/setter pairinherited

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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onBeforeProvidersForEmailFetch() → void
Called before an attempt to fetch available providers for the email.
override
onBeforeSignIn() → void
Called right before the authentication process starts.
override
onCanceled() → void
Called when the user cancells the sign in process.
override
onCredentialLinked(AuthCredential credential) → void
Called if the credential was successfully linked with the user account.
override
onCredentialReceived(AuthCredential credential) → void
Called before an attempt to link the credential with currently signed in user account.
override
onDifferentProvidersFound(String email, List<String> providers, AuthCredential? credential) → void
Called when available providers for the email were successfully fetched.
override
onError(Object error) → void
Called if an error occured during the authentication process.
override
onMFARequired(MultiFactorResolver resolver) → void
Called when the user has to complete MFA.
override
onSignedIn(UserCredential credential) → void
Called if the user has successfully signed in.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
Resets the controller to initial state. Usuall called when user cancels the authentication flow.
override
toString() String
A string representation of this object.
inherited

Operators

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