AuthFlow<T extends AuthProvider<AuthListener, AuthCredential> > constructor
AuthFlow<T extends AuthProvider<AuthListener, AuthCredential> > ({
- 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.
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.
Implementation
AuthFlow({
/// An initial [AuthState] of the auth flow
required this.initialState,
/// {@template ui.auth.auth_flow.ctor.provider}
/// An [AuthProvider] that is used to authenticate the user.
/// {@endtemplate}
required T provider,
/// {@macro ui.auth.auth_controller.auth}
fba.FirebaseAuth? auth,
/// {@macro ui.auth.auth_action}
AuthAction? action,
}) : auth = auth ?? fba.FirebaseAuth.instance,
_action = action,
_provider = provider,
super(initialState) {
_provider.authListener = this;
_provider.auth = auth ?? fba.FirebaseAuth.instance;
}