AuthState class sealed

Annotations
  • @Freezed(genericArgumentFactories: true, copyWith: true)

Constructors

AuthState.authenticated({required String token})
const
factory
AuthState.fromJson(Map<String, dynamic> json)
factory
AuthState.initial()
const
factory
AuthState.unauthenticated()
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isAuthenticated bool
no setter
isInitial bool
no setter
isUnauthenticated bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String?
no setter

Methods

map<TResult extends Object?>({required TResult initial(_Initial value), required TResult authenticated(_Authenticated value), required TResult unauthenticated(_Unauthenticated value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? initial(_Initial value)?, TResult? authenticated(_Authenticated value)?, TResult? unauthenticated(_Unauthenticated value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult initial(_Initial value)?, TResult authenticated(_Authenticated value)?, TResult unauthenticated(_Unauthenticated value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult initial()?, TResult authenticated(String token)?, TResult unauthenticated()?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult initial(), required TResult authenticated(String token), required TResult unauthenticated()}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? initial()?, TResult? authenticated(String token)?, TResult? unauthenticated()?}) → TResult?
inherited

Operators

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