Start native apps faster with the Composables CLI ->
Class

RemoteImageBitmap

Abstract base class for all remote bitmap representations in Compose Remote, this class extends [RemoteState].

Source set: Android
public abstract class RemoteImageBitmap internal constructor(
    public override val constantValueOrNull: ImageBitmap?,
    cacheKey: RemoteStateCacheKey,
) : BaseRemoteState<ImageBitmap>(cacheKey)

Abstract base class for all remote bitmap representations in Compose Remote, this class extends RemoteState<ImageBitmap>.

RemoteImageBitmap represents an image value that can be a constant, a named variable, or an offscreen buffer.

Properties

width

Source set: Android
public val width: RemoteFloat

The width of the bitmap as represented in the remote document.

height

Source set: Android
public val height: RemoteFloat

The height of the bitmap as represented in the remote document.

Members

Companion

Source set: Android
public companion object

Functions

invoke

Source set: Android
public operator fun invoke(value: ImageBitmap): RemoteImageBitmap

Creates a RemoteImageBitmap instance from a ImageBitmap value.

Parameters

value The ImageBitmap value.

Return

A RemoteImageBitmap representing the provided bitmap.

invoke

Source set: Android
public operator fun invoke(url: String): RemoteImageBitmap

Creates a RemoteImageBitmap from a URL.

Parameters

url The URL of the image.

Return

A RemoteImageBitmap representing the image from the URL.

createNamedRemoteImageBitmap

Source set: Android
public fun createNamedRemoteImageBitmap(
            name: String,
            defaultValue: ImageBitmap,
            domain: RemoteState.Domain = RemoteState.Domain.User,
        ): RemoteImageBitmap

Creates a named RemoteImageBitmap with an initial value.

Named remote bitmaps can be set via AndroidRemoteContext.setNamedBitmap.

Parameters

name A unique name to identify this state within its domain.
defaultValue The initial ImageBitmap value for the named remote bitmap.
domain The domain for the named state. Defaults to RemoteState.Domain.User.

Return

A RemoteImageBitmap representing the named bitmap.