JchuNetworkImage

fun JchuNetworkImage(model: Any?, modifier: Modifier = Modifier, isCrossfade: Boolean = true, alpha: Float = DefaultAlpha, placeholder: Painter? = null, error: Painter? = null, requestBuilder: ImageRequest.Builder.() -> Unit = {}, onLoading: () -> Unit? = null, onSuccess: () -> Unit? = null, onError: (Throwable?) -> Unit? = null, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null)

Multiplatform network image backed by Coil 3.

The consuming application is responsible for registering a Coil network fetcher for its targets (for example coil-network-okhttp on Android and coil-network-ktor3 on iOS). Platform-specific request options such as bitmap transformations can be applied through requestBuilder.

Parameters

model

data to load: a URL, coil3.Uri, file path, or any type supported by Coil.

modifier

modifier applied to the image.

isCrossfade

whether to fade the image in once loaded.

alpha

opacity applied to the image.

placeholder

painter shown while the image is loading.

error

painter shown when loading fails or model is null.

requestBuilder

extra configuration applied to the ImageRequest.

onLoading

called when loading starts.

onSuccess

called when the image has loaded.

onError

called with the failure cause when loading fails.

contentScale

how the image is scaled inside its bounds.

contentDescription

accessibility description, or null for decorative images.