ChangePasswordFlow class
The change password screen of a logged-in user. The user stays logged in on this device; ending other sessions is the backend's job.
- Inheritance
-
- Object
- BrixFlow<
AuthFormState> - FormFlow
- ChangePasswordFlow
Constructors
- ChangePasswordFlow({required AccountProvider account, required AuthSessionStore store, required AuthFeedback feedback, PasswordPolicy passwordPolicy = const PasswordPolicy()})
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
- passwordPolicy → PasswordPolicy
-
final
- 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
-
mapError(
Object error, StackTrace stackTrace) → Failure -
Turns a thrown error into a Failure (the backend adapter's mapping).
override
-
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 currentPassword, required String newPassword}) → Future< void> - Changes the password; both are sent exactly as typed. Warns without a backend call when the new one equals the current one or breaks the passwordPolicy. On success the saved "remember me" password is updated and the screen closes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited