AppBarScope
Interface
Common
sealed interface AppBarScope
DSL scope for building the content of an AppBarRow
and AppBarColumn
.
Functions
fun clickableItem(
onClick: () -> Unit,
icon: @Composable () -> Unit,
label: String,
enabled: Boolean = true,
)
Adds a clickable item to the AppBarRow
or AppBarColumn
.
Parameters
onClick | The action to perform when the item is clicked. |
icon | The composable representing the item's icon. |
enabled | Whether the item is enabled. |
label | The text label for the item, used in the overflow menu. |
fun toggleableItem(
checked: Boolean,
onCheckedChange: (Boolean) -> Unit,
icon: @Composable () -> Unit,
label: String,
enabled: Boolean = true,
)
Adds a toggleable item to the AppBarRow
or AppBarColumn
.
Parameters
checked | Whether the item is currently checked. |
onCheckedChange | The action to perform when the item's checked state changes. |
icon | The composable representing the item's icon. |
enabled | Whether the item is enabled. |
label | The text label for the item, used in the overflow menu. |
fun customItem(
appbarContent: @Composable () -> Unit,
menuContent: @Composable (AppBarMenuState) -> Unit,
)
Adds a custom item to the AppBarRow
or AppBarColumn
.
Parameters
appbarContent | The composable to display in the app bar. |
menuContent | The composable to display in the overflow menu. It receives an AppBarMenuState instance. |