text method

CachedCall<String> text(
  1. String key,
  2. Future<String> fetch()
)

Wraps a read whose answer is text already, such as a raw response body. Saved exactly as received; turn it into models with CachedCall.map.

Implementation

CachedCall<String> text(String key, Future<String> Function() fetch) =>
    call(key, fetch, codec: ApiCacheCodec.text);