Builder

class Builder

Constructors

Link copied to clipboard
constructor(context: PlatformContext)

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Enables adding a file's last modified timestamp to the memory cache key when loading an image from a file.

Link copied to clipboard

Create a new ImageLoader instance.

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

Set the DiskCache.

fun diskCache(initializer: () -> DiskCache?): ImageLoader.Builder

Set a lazy callback to create the DiskCache.

Link copied to clipboard

Set the default disk cache policy.

Link copied to clipboard

Set the default error image to use when a request fails.

Link copied to clipboard

Set a single EventListener that will receive all callbacks for requests launched by this image loader.

Link copied to clipboard
Link copied to clipboard

Set the default fallback image to use if ImageRequest.data is null.

Link copied to clipboard
Link copied to clipboard

Set the default FileSystem for any image requests.

Link copied to clipboard
Link copied to clipboard

Set the Logger to write logs to.

Link copied to clipboard

Set the MemoryCache.

fun memoryCache(initializer: () -> MemoryCache?): ImageLoader.Builder

Set a lazy callback to create the MemoryCache.

Link copied to clipboard

Set the default memory cache policy.

Link copied to clipboard

Set the default network cache policy.

Link copied to clipboard

Set the default placeholder image to use when a request starts.

Link copied to clipboard

Set the default precision for a request. Precision controls whether the size of the loaded image must match the request's size exactly or not.

Link copied to clipboard

Enables adding all components (fetchers and decoders) that are supported by the service locator to this ImageLoader's ComponentRegistry. All of Coil's first party decoders and fetchers are supported.