ImageModel

class ImageModel(val model: Any?, val placeholder: Painter? = null, val error: Painter? = null, val fallback: Painter? = error, val contentScale: ContentScale = ContentScale.Crop, val alpha: Float = DefaultAlpha, val colorFilter: ColorFilter? = null, val filterQuality: FilterQuality = DrawScope.DefaultFilterQuality)

Represents the model for the image.

Since

1.0.0-beta.1

Parameters

model

The model to load the image from.

placeholder

The placeholder to show while loading the image.

error

The painter to show when the image loading fails.

fallback

The painter to show when the image loading fails. Defaults to error.

contentScale

The scale of the content. Defaults to ContentScale.Crop.

alpha

The alpha value to apply to the image. Defaults to DefaultAlpha.

colorFilter

The color filter to apply to the image. Defaults to null.

filterQuality

The quality of the filter. Defaults to DrawScope.DefaultFilterQuality.

Constructors

Link copied to clipboard
constructor(model: Any?, placeholder: Painter? = null, error: Painter? = null, fallback: Painter? = error, contentScale: ContentScale = ContentScale.Crop, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val error: Painter? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val model: Any?
Link copied to clipboard
val placeholder: Painter? = null

Functions

Link copied to clipboard
fun copy(model: Any? = this.model, placeholder: Painter? = this.placeholder, error: Painter? = this.error, fallback: Painter? = this.fallback, contentScale: ContentScale = this.contentScale, alpha: Float = this.alpha, colorFilter: ColorFilter? = this.colorFilter, filterQuality: FilterQuality = this.filterQuality): ImageModel
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int