rememberPainterPaletteState

fun rememberPainterPaletteState(density: Density = LocalDensity.current, layoutDirection: LayoutDirection = LocalLayoutDirection.current, cacheSize: Int = DominantColorState.DEFAULT_CACHE_SIZE, coroutineContext: CoroutineContext = Dispatchers.Default, builder: Palette.Builder.() -> Unit = {}): PaletteState<Painter>

Wrapper around rememberPaletteState that uses PainterLoader to load the image.

Return

A PaletteState that will be remembered across composition.

Parameters

density

The Density used for drawing the Painter as ImageBitmap.

layoutDirection

The LayoutDirection used for drawing the Painter as ImageBitmap.

cacheSize

The maximum number of Palettes to cache. If 0, no caching will be done.

coroutineContext

The CoroutineContext to use for generating Palettes.

builder

A lambda that will be applied to the Palette.Builder to customize the generation of the Palette.

See also