Loader typedef Null safety

Loader = FutureOr<HttpClientResponse> Function(String url)

A function that produces http response for url, for when a Cache needs to populate an entry.

The loader function should either return a value synchronously or a Future which completes with the value asynchronously.

Implementation

typedef FutureOr<HttpClientResponse> Loader(String url);