LoginFlow<TUser> class
Everything the login screen does, without any UI or state library.
Form validation stays in the app (it needs Flutter); call submit only with valid input.
- Inheritance
-
- Object
- BrixFlow<
AuthFormState> - FormFlow
- AuthFormFlow<
TUser> - LoginFlow
Constructors
-
LoginFlow({required AuthProvider<
dynamic, TUser> provider, required AuthSessionStore<TUser> store, required AuthFeedback feedback, FutureOr<void> onLoggedIn(AuthSession<TUser> session)?})
Properties
-
changes
→ Stream<
AuthFormState> -
Every new state, delivered right away (synchronously).
no setterinherited
- feedback → AuthFeedback
-
For subclasses: the alerts.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
no setterinherited
-
onLoggedIn
→ FutureOr<
void> Function(AuthSession<TUser> session)? -
Runs after the session is saved, before home opens, for app state
that lives outside the store (e.g. a cached current user).
final
-
provider
→ AuthProvider<
dynamic, TUser> -
For subclasses: the backend.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → AuthFormState
-
no setterinherited
Methods
-
dispose(
) → Future< void> -
Stops all listeners. Call it when the screen that owns the flow closes.
inherited
-
emit(
AuthFormState state) → void -
Sets a new state. For subclasses only; ignored after dispose.
inherited
-
loadRemembered(
) → Future< RememberedCredentials?> -
The saved "remember me" details to fill the form with, or
null. A storage error counts as nothing saved. -
mapError(
Object error, StackTrace stackTrace) → Failure -
Turns a thrown error into a Failure (the backend adapter's mapping).
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
Future< void> action()) → Future<void> -
Runs
actionunless one is already running (double tap) or the flow is disposed. Errors thrown byactiongo through mapError to AuthFeedback.failure.inherited -
submit(
{required String identifier, required String password, bool rememberMe = false}) → Future< void> - Logs in. Ignored while a login is already running (double tap).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited