fresh_dio
An http interceptor for token refresh. Fresh is built on top of package:dio and manages authentication tokens transparently.
0.6.0
16K downloads/mo
#2415 most downloaded on pub.dev
felangel/fresh
What this package is like to depend on
Last release 5 months ago
26 Feb 2026
Ships fairly regularly
a new release about every 7 months
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
18 releases · first in 2020
5 releases in the last 12 months
see the full history below
Release timeline
18 releases · May 2020 to Feb 2026
2021
2022
2023
2024
2025
2026
Releases
latest 18-
0.6.026 Feb 2026Release notes
Open source →- BREAKING feat: adjust the default
shouldRefreshBeforeRequestto automatically refresh if the token expires within 30s
Release notes
Open source →- BREAKING feat: adjust the default
shouldRefreshBeforeRequestto automatically refresh if the token expires within 30s
- BREAKING feat: adjust the default
-
0.5.120 Feb 2026 -
0.5.019 Feb 2026Release notes
Open source →- feat:
ShouldRefreshBeforeRequestallows conditional token refresh based on request details (path, headers, etc.) and token expiration - feat: automatic token refresh based on expiration before requests
- feat: enhanced token validation with
Token.expiresAtgetter - feat: support for custom token validation logic with RequestOptions context
- feat:
-
0.4.508 Jan 2026 -
0.4.419 Oct 2025 -
0.4.302 Mar 2025Release notes
Open source →- fix: clone
FormDataon retry - feat: support subclasses of
OAuth2TokeninFresh.oAuth2 - chore: upgrade to
mocktail ^1.0.0
- fix: clone
-
0.4.220 Jul 2024Release notes
Open source →- feat: add
assertto prevent infinite refresh loop - fix: tighten
package:dioversion constraint - chore: update copyright year
- chore: add funding to
pubspec.yaml - ci: revamp ci setup
- feat: add
-
0.4.125 Jul 2023Release notes
Open source →- fix: replace
InterceptorwithQueuedInterceptor - refactor: use
DioExceptioninstead of deprecatedDioError - docs: minor updates to
LICENSEandREADME - chore: adjust dart sdk constraint to
">=2.15.0 <4.0.0" - chore: use more strict analysis options
- chore: various updates to example app
- fix: replace
-
0.4.029 Mar 2023Release notes
Open source →- feat: upgrade to
dio ^0.5.0 - feat: upgrade dart to
sdk: ">=2.15.0 <3.0.0"
- feat: upgrade to
-
0.3.204 Apr 2022Release notes
Open source →- feat: add httpClient parameter to Fresh.oAuth2 (#60)
- chore: upgrade dev dependencies
mocktail: ^0.3.0very_good_analysis: ^2.4.0
-
0.3.126 Apr 2021 -
0.3.010 Apr 2021Release notes
Open source →- BREAKING: update to
dio: ^4.0.0 - fix: queue concurrent requests during refresh
- BREAKING: update to
-
0.3.0-nullsafety.011 Mar 2021 pre-releaseRelease notes
Open source →- BREAKING: update to dart 2.12 with null safety
- BREAKING: update to
fresh: ^0.4.0 - BREAKING: update to
dio: ^4.0.0-beta7
-
0.2.011 Aug 2020Release notes
Open source →- BREAKING: update to
fresh: ^0.3.0 - fix: throw
DioErroronRevokeTokenException(#26)
- BREAKING: update to
-
0.1.324 Jun 2020 -
0.1.208 Jun 2020 -
0.1.122 May 2020 -
0.1.020 May 2020Release notes
Open source →Initial Release of the library (copy of package:fresh v0.2.0)
- Includes
Freshinterceptor with built-in token refresh.
- Includes