UsageScreenContent

fun UsageScreenContent(modifier: Modifier = Modifier, screen: UsageScreenKind, usage: UsageState, onBack: () -> Unit = {}, onSelectCategory: (UsageCategory) -> Unit = {}, onClearCategory: (UsageCategory) -> Unit = {}, onPrimaryAction: () -> Unit = {})(source)

Shared standalone layout for storage and network usage screens.

The content owns the top app bar, shimmer loading state, interactive donut chart, category list, and pinned primary CTA. It deliberately does not depend on app bottom navigation so callers can mount it as a full-screen route like benchmark and configuration flows.

Author

Dmitriy Moroz

Parameters

modifier

Compose modifier applied to the outer scaffold.

screen

Storage or network flavor that controls copy, CTA, placeholders, and row actions.

usage

Current dashboard data, including shimmer loading state and selected category.

onBack

Called when the standalone screen back button is tapped.

onSelectCategory

Called when a row or donut segment selects a usage category.

onClearCategory

Called from storage rows when the user requests category deletion.

onPrimaryAction

Called by the pinned CTA to clear storage or reset traffic statistics.