Refresh<T> class Null safety

Inheritance
Mixed in types

Constructors

Refresh({required TokenHeaderBuilder<T> tokenHeader, required TokenStorage<T> tokenStorage, RefreshToken<T>? refreshToken, ShouldRequest<T>? shouldRequest, ShouldRefresh? shouldRefresh})

Properties

authenticationStatus Stream<AuthenticationStatus>
Returns a Stream<AuthenticationStatus> which can be used to get notified of changes to the authentication state based on the presence/absence of a token.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
token Future<T?>
Returns the current token.
read-onlyinherited
tokenStorage TokenStorage<T>
Setter for the TokenStorage instance.
write-onlyinherited

Methods

clearToken() Future<void>
Clears token storage and updates the AuthenticationStatus to AuthenticationStatus.unauthenticated.
inherited
close() Future<void>
Closes StreamController.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onError(DioError err, ErrorInterceptorHandler handler) Future
The callback will be executed on error.
override
onRequest(RequestOptions options, RequestInterceptorHandler handler) Future
The callback will be executed before the request is initiated.
override
onResponse(Response response, ResponseInterceptorHandler handler) Future
The callback will be executed on success. If you want to continue the response, call handler.next.
override
revokeToken() Future<void>
Delete the storaged token. and emit the AuthenticationStatus.unauthenticated if authenticationStatus not is AuthenticationStatus.unauthenticated This method should be called when the token is no longer valid.
inherited
setToken(T? token) Future<void>
Sets the internal token to the provided token and updates the AuthenticationStatus accordingly.
inherited
toString() String
A string representation of this object.
inherited
updateHttpClient({required NetworkService service}) → void

Operators

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