ImageRequest

An immutable value object that represents a request for an image.

See also

Types

Link copied to clipboard
class Builder
Link copied to clipboard
class Defaults(val fileSystem: FileSystem = defaultFileSystem(), val interceptorCoroutineContext: CoroutineContext = EmptyCoroutineContext, val fetcherCoroutineContext: CoroutineContext = ioCoroutineDispatcher(), val decoderCoroutineContext: CoroutineContext = ioCoroutineDispatcher(), val memoryCachePolicy: CachePolicy = CachePolicy.ENABLED, val diskCachePolicy: CachePolicy = CachePolicy.ENABLED, val networkCachePolicy: CachePolicy = CachePolicy.ENABLED, val placeholderFactory: (ImageRequest) -> Image? = EMPTY_IMAGE_FACTORY, val errorFactory: (ImageRequest) -> Image? = EMPTY_IMAGE_FACTORY, val fallbackFactory: (ImageRequest) -> Image? = EMPTY_IMAGE_FACTORY, val sizeResolver: SizeResolver = SizeResolver.ORIGINAL, val scale: Scale = Scale.FIT, val precision: Precision = Precision.EXACT, val extras: Extras = Extras.EMPTY)

A set of default options that are used to fill in unset ImageRequest values.

Link copied to clipboard
class Defined(val fileSystem: FileSystem?, val interceptorCoroutineContext: CoroutineContext?, val fetcherCoroutineContext: CoroutineContext?, val decoderCoroutineContext: CoroutineContext?, val memoryCachePolicy: CachePolicy?, val diskCachePolicy: CachePolicy?, val networkCachePolicy: CachePolicy?, val placeholderFactory: (ImageRequest) -> Image??, val errorFactory: (ImageRequest) -> Image??, val fallbackFactory: (ImageRequest) -> Image??, val sizeResolver: SizeResolver?, val scale: Scale?, val precision: Precision?)

Tracks which values have been set (instead of computed automatically using a default) when building an ImageRequest.

Link copied to clipboard
interface Listener

A set of callbacks for an ImageRequest.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val data: Any
Link copied to clipboard
Link copied to clipboard

The defaults used to fill unset values.

Link copied to clipboard

The raw values set on Builder.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun error(): Image?

Create and return a new error image.

Link copied to clipboard
fun fallback(): Image?

Create and return a new fallback image.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Create and return a new placeholder image.