Function

createNamedRemoteDp

Creates a named RemoteDp with an initial value.

createNamedRemoteDp

Source set: Android
public fun createNamedRemoteDp(
    name: String,
    defaultValue: Float,
    domain: RemoteState.Domain = RemoteState.Domain.User,
): RemoteDp

Creates a named RemoteDp with an initial value.

Named remote Dps can be set via AndroidRemoteContext.setNamedFloat.

Parameters

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

Return

A RemoteDp representing the named Dp.

createNamedRemoteDp

Source set: Android
public fun createNamedRemoteDp(
    name: String,
    domain: RemoteState.Domain = RemoteState.Domain.User,
    value: () -> RemoteDp,
): RemoteDp

Creates a named RemoteDp expression.

Parameters

name A unique name to identify this state within its domain.
domain The domain for the named state. Defaults to RemoteState.Domain.User.
value A lambda that provides the RemoteDp expression.

Return

A RemoteDp representing the named Dp expression.

createNamedRemoteDp

Source set: Android
public fun RemoteDp.Companion.createNamedRemoteDp(
    name: String,
    defaultValue: Dp,
    domain: RemoteState.Domain = RemoteState.Domain.User,
): RemoteDp

Creates a named RemoteDp with an initial value.

Named remote Dps can be set via AndroidRemoteContext.setNamedFloat.

Parameters

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

Return

A RemoteDp representing the named Dp.

createNamedRemoteDp

Source set: Android
public fun createNamedRemoteDp(
    name: String,
    defaultValue: Dp,
    domain: RemoteState.Domain = RemoteState.Domain.User,
): RemoteDp

Creates a named RemoteDp with an initial value.

Named remote Dps can be set via AndroidRemoteContext.setNamedFloat.

Parameters

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

Return

A RemoteDp representing the named Dp.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: