TokenHandler<T extends Object> class
Constructors
-
TokenHandler({required bool isTokenValid(T token), required FutureOr<
String> authorize(T token), RefreshToken<T> ? refreshToken, bool errorShouldClearToken(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), RefreshToken<T> ? refreshToken, bool errorShouldClearToken(Object error)?})
Properties
-
no setter
-
final
- errorShouldClearToken → 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
→ RefreshToken<
T> ? -
final
-
requireAuthorization
→ Future<
String> -
no setter
- 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< token) → Future<T> >void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited