AirshipEmbeddedView

fun AirshipEmbeddedView(embeddedId: String, modifier: Modifier = Modifier, comparator: Comparator<AirshipEmbeddedInfo>? = null, contentAlignment: Alignment = AirshipEmbeddedViewDefaults.ContentAlignment, parentWidthProvider: () -> Int? = null, parentHeightProvider: () -> Int? = null, animatedContentTransform: ContentTransform = AirshipEmbeddedViewDefaults.NoContentTransform, placeholder: @Composable () -> Unit? = null)

A container that displays embedded content for the given embeddedId.

When included inside of a lazy composable or scrolling list, prefer using the variant of this composable that accepts an AirshipEmbeddedViewState, which may be hoisted to avoid unnecessary recompositions.

Parameters

embeddedId

the embedded ID.

modifier

the modifier to apply to this layout.

comparator

optional Comparator used to sort available embedded contents.

contentAlignment

optional alignment of the embedded content.

parentWidthProvider

optional provider for the parent width.

parentHeightProvider

optional provider for the parent height.

animatedContentTransform

optional ContentTransform used to animate content changes.

placeholder

optional placeholder composable to display when no content is available.


fun AirshipEmbeddedView(state: AirshipEmbeddedViewState, modifier: Modifier = Modifier, contentAlignment: Alignment = AirshipEmbeddedViewDefaults.ContentAlignment, animatedContentTransform: ContentTransform = AirshipEmbeddedViewDefaults.NoContentTransform, parentWidthProvider: () -> Int? = null, parentHeightProvider: () -> Int? = null, placeholder: @Composable () -> Unit? = null)

A container that displays embedded content for the embeddedId defined on the given AirshipEmbeddedViewState instance.

This composable may be useful when access to the embedded view state is needed outside of the AirshipEmbeddedView composable, embedded view state should be hoisted, and for advanced custom logic that depends on the availability of embedded view content.

When included inside of a lazy composable or scrolling list, prefer using the default value for animatedContentTransform and use the animation support provided by the lazy composable.

Parameters

state

the AirshipEmbeddedViewState to be used by this embedded view.

modifier

the modifier to apply to this layout.

contentAlignment

optional alignment of the embedded content.

animatedContentTransform

optional ContentTransform used to animate content changes.

parentWidthProvider

optional provider for the parent width.

parentHeightProvider

optional provider for the parent height.

placeholder

optional placeholder composable to display when no content is available.