AuthState class

Authentication state container.

Constructors

AuthState({AuthStatus status = AuthStatus.unknown, AuthUser? user, String? error})
const
AuthState.authenticated(AuthUser authenticatedUser)
AuthState.loading()
const
AuthState.unauthenticated()
const
AuthState.withError(String errorMessage)

Properties

error → String?
final
hasError → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
isAuthenticated → bool
no setter
isLoading → bool
no setter
isUnknown → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → AuthStatus
final
user → AuthUser?
final

Methods

copyWith({AuthStatus? status, AuthUser? user, String? error}) → AuthState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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