rememberSdkAppearance

Remembers and observes the active remote SdkAppearance configuration for client.

If an enclosing SdkSurface or CupThreadTheme has already provided an SdkAppearance via LocalSdkAppearance, that instance is immediately returned without performing a redundant network call. Otherwise, this composable executes an asynchronous query against FeedbackClient.fetchAppConfig inside a LaunchedEffect, gracefully falling back to SdkAppearance.defaults if the request fails or the device is offline.

Use this composable when building custom UI flows that need to conditionally render components based on remote console settings:

@Composable
fun SettingsScreen(client: FeedbackClient, userToken: String) {
val appearance = rememberSdkAppearance(client)

Column {
Text("Settings", style = MaterialTheme.typography.titleLarge)

if (appearance.features.isEnabled(SdkFeature.FEEDBACK)) {
Button(onClick = { /* navigate to feedback composer */}) {
Text("Send Feedback")
}
}

if (appearance.features.isEnabled(SdkFeature.CHANGELOG)) {
Button(onClick = { /* open changelog */}) {
Text(appearance.changelogOverlay.title)
}
}
}
}

Return

The resolved SdkAppearance state.

Parameters

client

The FeedbackClient used to retrieve remote app appearance and features.