AuthCodeEntryFlow<TUser> class
abstract
A CodeEntryFlow whose codes come from an AuthProvider (signup code, password reset).
- Inheritance
-
- Object
- BrixFlow<
CodeEntryState> - CodeEntryFlow
- AuthCodeEntryFlow
- Implementers
Constructors
-
AuthCodeEntryFlow({required AuthProvider<
dynamic, TUser> provider, required AuthFeedback feedback, required OtpPurpose purpose, required Duration resendCooldown, String? identifier})
Properties
-
changes
→ Stream<
CodeEntryState> -
Every new state, delivered right away (synchronously).
no setterinherited
- feedback → AuthFeedback
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
no setterinherited
- otpLength → int
-
Digits in a code.
no setteroverride
-
provider
→ AuthProvider<
dynamic, TUser> -
final
- purpose → OtpPurpose
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → CodeEntryState
-
no setterinherited
Methods
-
checkCodeLength(
String code) → bool -
For subclasses: warns and returns false when
codehas the wrong number of digits.inherited -
dispose(
) → Future< void> -
Stops all listeners. Call it when the screen that owns the flow closes.
inherited
-
emit(
CodeEntryState 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
-
markFailed(
) → void -
For subclasses: the backend rejected the code.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resend(
) → Future< void> -
Asks for a (new) code. Ignored during the cooldown or while a request
is running.
inherited
-
sendCode(
String identifier) → Future< Result< void> > -
Sends a (new) code to
identifier.override -
setIdentifier(
String identifier) → void -
For subclasses: the identifier became known (e.g. read from storage).
inherited
-
startCooldown(
) → void -
For subclasses: a code was just sent, start the wait.
inherited
-
submitOnce(
Future< void> action()) → Future<void> -
For subclasses: runs
actionunless a submit is running. A thrown error is shown and counts as a rejected code.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited