Fetcher

fun interface Fetcher

A Fetcher translates data (e.g. URI, file, etc.) into a FetchResult.

To accomplish this, fetchers fit into one of two types:

  • Uses the data as a key to fetch bytes from a remote source (e.g. network, disk) and exposes it as an ImageSource.

  • Reads the data directly and translates it into an Image.

Types

Link copied to clipboard
fun interface Factory<T : Any>

Functions

Link copied to clipboard
abstract suspend fun fetch(): FetchResult?

Fetch the data provided by Factory.create or return 'null' to delegate to the next Factory in the component registry.