Flutter Cache JSON response using http response header
问题 I'm trying to create and use a cache for a server JSON response. something like volley response caching does. https://stackoverflow.com/a/32022946/1993001 in Android I am using DIO for network operations. 回答1: You can you create your own cache with Interceptors on top of Dio requests. You can create in on your own: import 'package:dio/dio.dart'; class CacheInterceptor extends Interceptor { CacheInterceptor(); var _cache = new Map<Uri, Response>(); @override onRequest(RequestOptions options)