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
public val width: RemoteFloat
The width of the bitmap as represented in the remote document.
height
public val height: RemoteFloat
The height of the bitmap as represented in the remote document.
Members
Companion
public companion object
Functions
invoke
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
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
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.