TokenHandler<T extends Object> class

Constructors

TokenHandler({required bool isTokenValid(T token), required FutureOr<String> authorize(T token), FutureOr<T> refreshToken(T token)?, bool errorShouldInvalidateToken(Object error)?})
TokenHandler.storage({required String key, required Storage storage, JsonObject toJson(T value)?, required T fromJson(JsonObject json), required bool isTokenValid(T token), required FutureOr<String> authorize(T token), FutureOr<T> refreshToken(T token)?, bool errorShouldInvalidateToken(Object error)?})

Properties

authorization Future<String?>
no setter
authorize FutureOr<String> Function(T token)
final
errorShouldInvalidateToken bool Function(Object error)?
final
hashCode int
The hash code for this object.
no setterinherited
hasToken → LiveData<bool>
latefinal
isTokenValid bool Function(T token)
final
refreshToken FutureOr<T> Function(T token)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token → LiveData<T?>
no setter

Methods

clear() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateToken(ValueGetter<FutureOr<T>> token) Future<void>

Operators

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