dio_refresh library

Classes

DioRefreshInterceptor
A custom Dio interceptor that handles token refresh logic for authenticated API requests.
TokenManager
A singleton class to manage access and refresh tokens for authentication.
TokenStore
A class that holds authentication tokens for API requests.

Typedefs

IsTokenValidCallback = bool Function(String)
A callback function to check whether a token is valid.
OnRefreshCallback = Future<TokenStore> Function(Dio, TokenStore)
A callback function that handles the token refresh process.
ShouldRefreshCallback = bool Function(Response?)
A callback function that determines whether a response should trigger a token refresh.
TokenHeaderCallback = Map<String, String> Function(TokenStore)
A callback function that generates the authorization headers for API requests.