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