Start native apps faster with the Composables CLI ->
Composable Function

RemoteImage

A composable that lays out and draws a given RemoteImageBitmap.

RemoteImageSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteImageSample() {
    val remoteBitmap = rememberRemoteImageBitmap(url = "https://example.com/placeholder.png")
    RemoteImage(
        remoteBitmap = remoteBitmap,
        contentDescription = "Sample Remote Image".rs,
        modifier = RemoteModifier.size(100.rdp),
        contentScale = ContentScale.Crop,
    )
}

RemoteImageFitSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteImageFitSample() {
    val remoteBitmap = rememberRemoteImageBitmap(url = "https://example.com/placeholder.png")
    RemoteImage(
        remoteBitmap = remoteBitmap,
        contentDescription = "Fit Sample".rs,
        modifier = RemoteModifier.size(100.rdp),
        contentScale = ContentScale.Fit,
    )
}