DSL scope for building the content of an AppBarRow.

Summary

Public functions

Unit
clickableItem(
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: String,
    enabled: Boolean
)

Adds a clickable item to the AppBarRow.

Cmn
Unit
customItem(
    appbarContent: @Composable () -> Unit,
    menuContent: @Composable (AppBarRowMenuState) -> Unit
)

Adds a custom item to the AppBarRow.

Cmn
Unit
toggleableItem(
    checked: Boolean,
    onCheckedChange: (Boolean) -> Unit,
    icon: @Composable () -> Unit,
    label: String,
    enabled: Boolean
)

Adds a toggleable item to the AppBarRow.

Cmn

Public functions

clickableItem

fun clickableItem(
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: String,
    enabled: Boolean = true
): Unit

Adds a clickable item to the AppBarRow.

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 (AppBarRowMenuState) -> Unit
): Unit

Adds a custom item to the AppBarRow.

Parameters
appbarContent: @Composable () -> Unit

The composable to display in the app bar.

menuContent: @Composable (AppBarRowMenuState) -> Unit

The composable to display in the overflow menu. It receives an AppBarRowMenuState instance.

toggleableItem

fun toggleableItem(
    checked: Boolean,
    onCheckedChange: (Boolean) -> Unit,
    icon: @Composable () -> Unit,
    label: String,
    enabled: Boolean = true
): Unit

Adds a toggleable item to the AppBarRow.

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.