AppBarWithSearchColors

Represents the colors used by an [AppBarWithSearch].

AppBarWithSearchColors

Class

Common
@ExperimentalMaterial3Api
class AppBarWithSearchColors(
    val searchBarColors: SearchBarColors,
    val scrolledSearchBarContainerColor: Color,
    val appBarContainerColor: Color,
    val scrolledAppBarContainerColor: Color,
    val appBarNavigationIconColor: Color,
    val appBarActionIconColor: Color,
)

Represents the colors used by an AppBarWithSearch.

See SearchBarDefaults.appBarWithSearchColors for the default implementation that follows Material specifications.

Parameters

searchBarColorsthe color used for the SearchBar of this app bar.
scrolledSearchBarContainerColorthe container color of the search bar when content is scrolled
appBarContainerColorthe app bar container color. Use Color.Transparent to have no color.
scrolledAppBarContainerColorthe app bar container color when content is scrolled.
appBarNavigationIconColorthe color used for the app bar navigation icon
appBarActionIconColorthe color used for the app bar action icons

Secondary Constructors

constructor(
    searchBarColors: SearchBarColors,
    appBarContainerColor: Color,
    appBarNavigationIconColor: Color,
    appBarActionIconColor: Color,
) : this(
    searchBarColors,
    Color.Unspecified,
    appBarContainerColor,
    Color.Unspecified,
    appBarNavigationIconColor,
    appBarActionIconColor,
)