rememberImagePainter

@Composable
inline fun rememberImagePainter(data: Any?, imageLoader: ImageLoader, onExecute: ImagePainter.ExecuteCallback = ExecuteCallback.Default, builder: ImageRequest.Builder.() -> Unit = {}): ImagePainter

Return an ImagePainter that will execute an ImageRequest using imageLoader.

Parameters

data

The ImageRequest.data to load.

imageLoader

The ImageLoader that will be used to execute the request.

onExecute

Called immediately before the ImagePainter launches an image request. Return 'true' to proceed with the request. Return 'false' to skip executing the request.

builder

An optional lambda to configure the request.

@Composable
fun rememberImagePainter(request: ImageRequest, imageLoader: ImageLoader, onExecute: ImagePainter.ExecuteCallback = ExecuteCallback.Default): ImagePainter

Return an ImagePainter that will execute the request using imageLoader.

Parameters

request

The ImageRequest to execute.

imageLoader

The ImageLoader that will be used to execute request.

onExecute

Called immediately before the ImagePainter launches an image request. Return 'true' to proceed with the request. Return 'false' to skip executing the request.