I have added this package to cache API calls but it seems that this is not working for web since Flutter web doesn't allows us to use path_provider. Here's my implementation that I'm using right now:
final dir = await getTemporaryDirectory();
final options = CacheOptions(
store: HiveCacheStore(dir.path),
hitCacheOnErrorExcept: [401, 403],
);
/// Adding caching interceptor for request
dio.interceptors.add(DioCacheInterceptor(options: options));
I have added this package to cache API calls but it seems that this is not working for web since Flutter web doesn't allows us to use path_provider. Here's my implementation that I'm using right now: