rememberNetworkPaletteState

fun rememberNetworkPaletteState(cacheSize: Int = PaletteState.DEFAULT_CACHE_SIZE, httpClient: HttpClient = HttpClient(), httpRequestBuilder: HttpRequestBuilder = HttpRequestBuilder(), coroutineContext: CoroutineContext = Dispatchers.Default, builder: Palette.Builder.() -> Unit = {}): PaletteState<Url>

Wrapper around rememberPaletteState that uses NetworkLoader to load the image.

You must import the Ktor client library to use this loader.

Return

A PaletteState that will be remembered across composition.

Parameters

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