AppWidgetHostPreview

@Composable()
fun AppWidgetHostPreview(modifier: Modifier = Modifier, displaySize: DpSize = DpSize.Unspecified, provider: AppWidgetProviderInfo? = null, content: suspend (Context) -> RemoteViews)

Use this composable inside a androidx.compose.ui.tooling.preview.Preview composable to display previews of RemoteViews (e.g using GlanceRemoteViews from Glance-appwidget)

Tip: Click on the container to force a content update.

Parameters

modifier

defines the container box for the host

displaySize

the available size for the RemoteViews, if not provider it will match parent

provider

optionally provide the AppWidgetProviderInfo to provide additional information for the host.

content

a suspend lambda returning the actual RemoteViews