Package-level declarations

Types

Link copied to clipboard
class AppShowcaseLabels(val title: String, val viewAll: String, val viewAllDescription: String, val store: String, val open: String, val empty: String, val failed: String, val loading: String, val retry: String, val storeActionDescription: (appName: String) -> String, val openActionDescription: (appName: String) -> String)

The words an AppShowcase uses. The host supplies them, so the section speaks the app's language and names its own store; loading and retry default to the Toolkit's strings.

Link copied to clipboard
sealed interface AppShowcaseState

What an AppShowcase shows: the apps, or why there are none yet.

Link copied to clipboard
data class ShowcaseApp(val key: String, val name: String, val category: String, val description: String, val iconUrl: String, val installed: Boolean = false)

One app in an AppShowcase.

Functions

Link copied to clipboard
fun AppShowcase(state: AppShowcaseState, labels: AppShowcaseLabels, icon: ImageVector, onAppClick: (ShowcaseApp) -> Unit, onAppAction: (ShowcaseApp) -> Unit, onViewAll: () -> Unit, onRetry: () -> Unit, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), onCardsVisibilityChanged: (Boolean) -> Unit = {})

A "more apps" section, the Compose counterpart of Material Next's mnw-app-showcase: a heading with the section's icon and a "View all" action, then the apps as filled cards with their icon, name, category, a full-width description and a tonal store (or open) action.

Link copied to clipboard
fun appShowcaseLabels(title: String, viewAll: String, viewAllDescription: String, store: String, open: String, empty: String, failed: String, storeActionDescription: (appName: String) -> String, openActionDescription: (appName: String) -> String, loading: String = stringResource(R.string.loading), retry: String = stringResource(R.string.try_again)): AppShowcaseLabels

AppShowcaseLabels with the Toolkit's own loading and retry strings.

Link copied to clipboard
fun ShowcaseAppCard(app: ShowcaseApp, labels: AppShowcaseLabels, onClick: () -> Unit, onAction: () -> Unit, modifier: Modifier = Modifier)

One app on a filled surface with 28 dp corners, like the surrounding tool widgets. The header keeps the icon beside the name; description and action use the whole card width. Reserved text lines keep every card the same height without clipping large-font content.