Skip to content

Commit

Permalink
feat(fresh_dio): support subclasses of OAuth2Token in Fresh.oAuth2 (
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 authored Dec 5, 2024
1 parent 2a17d1b commit 5103a43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/fresh_dio/lib/src/fresh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ class Fresh<T> extends QueuedInterceptor with FreshMixin<T> {
/// ),
/// );
/// ```
static Fresh<OAuth2Token> oAuth2({
required TokenStorage<OAuth2Token> tokenStorage,
required RefreshToken<OAuth2Token> refreshToken,
static Fresh<T> oAuth2<T extends OAuth2Token>({
required TokenStorage<T> tokenStorage,
required RefreshToken<T> refreshToken,
ShouldRefresh? shouldRefresh,
Dio? httpClient,
TokenHeaderBuilder<OAuth2Token>? tokenHeader,
TokenHeaderBuilder<T>? tokenHeader,
}) {
return Fresh<OAuth2Token>(
return Fresh<T>(
refreshToken: refreshToken,
tokenStorage: tokenStorage,
shouldRefresh: shouldRefresh,
Expand Down

0 comments on commit 5103a43

Please sign in to comment.