AuthenticationState class final

The immutable state emitted by AuthenticationBloc.

Use the named constructors to create concrete states. The user field is only meaningful when status is AuthenticationStatus.authenticated; in all other states it falls back to UserModel.empty.

Inheritance

Constructors

AuthenticationState.authenticated({required UserModel? user})
The state emitted when a valid session exists.
const
AuthenticationState.unauthenticated()
The state emitted when no valid session exists or after logout.
const
AuthenticationState.unknown()
The initial state before startup resolution completes.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status AuthenticationStatus
The current authentication status.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
user UserModel?
The authenticated user, or UserModel.empty when not authenticated.
final

Methods

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