Function

getAppWidgetState

Retrieve the state of an app widget.

getAppWidgetState

Source set: Android
public suspend fun <T> getAppWidgetState(
    context: Context,
    definition: GlanceStateDefinition<T>,
    glanceId: GlanceId,
): T

Retrieve the state of an app widget.

The state definition must be the one used for that particular app widget.

getAppWidgetState

Source set: Android
public suspend fun <T> GlanceAppWidget.getAppWidgetState(
    @Suppress("ContextFirst") context: Context,
    glanceId: GlanceId,
): T

Get the state of an App Widget.

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: