NetworkResource<T> constructor

NetworkResource<T>(
  1. {@required String url,
  2. @required LocalResource<T> cache,
  3. Duration maxAge,
  4. CacheStrategy strategy,
  5. Parser<T> parser}
)

Implementation

NetworkResource(
    {@required String url,
    @required this.cache,
    this.maxAge,
    CacheStrategy strategy,
    this.parser})
    : strategy = strategy ?? CacheStrategy.networkFirst,
      super(location: url) {
  cache._parserOverride = parser;
}