AuthError<T> class

State representing a failed authentication attempt with error.

Inheritance

Constructors

AuthError(Object error, StackTrace stackTrace)
Creates an AuthError state with error and stackTrace.
const

Properties

error → Object
The error object describing the failure.
final
hasError → bool
Whether an authentication error has occurred.
no setterinherited
hashCode → int
The hash code for this object.
no setteroverride
isAuthenticated → bool
Whether a user is currently authenticated.
no setterinherited
isAuthenticating → bool
Whether an authentication request is in progress.
no setterinherited
isUnauthenticated → bool
Whether the user is currently unauthenticated.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → StackTrace
The stack trace captured during the failure.
final
userOrNull → T?
The active user object if authenticated, or null otherwise.
no setterinherited

Methods

maybeWhen<R>({R unauthenticated()?, R authenticating()?, R authenticated(T user)?, R error(Object error, StackTrace stackTrace)?, required R orElse()}) → R
Pattern-matches with an orElse fallback for unhandled states.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
when<R>({required R unauthenticated(), required R authenticating(), required R authenticated(T user), required R error(Object error, StackTrace stackTrace)}) → R
Exhaustively pattern-matches all four auth states.
inherited
whenOrNull<R>({R unauthenticated()?, R authenticating()?, R authenticated(T user)?, R error(Object error, StackTrace stackTrace)?}) → R?
Pattern-matches and returns null for unhandled states.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override