TopAppBarState

class TopAppBarState(initialHeightOffsetLimit: Float, initialHeightOffset: Float, initialContentOffset: Float)

A state object that can be hoisted to control and observe the top app bar state. The state is read and updated by a TopAppBarScrollBehavior implementation.

In most cases, this state will be created via rememberTopAppBarState.

Parameters

initialHeightOffsetLimit

the initial value for TopAppBarState.heightOffsetLimit

initialHeightOffset

the initial value for TopAppBarState.heightOffset

initialContentOffset

the initial value for TopAppBarState.contentOffset

Constructors

Link copied to clipboard
constructor(initialHeightOffsetLimit: Float, initialHeightOffset: Float, initialContentOffset: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A value that represents the collapsed height percentage of the app bar.

Link copied to clipboard

The total offset of the content scrolled under the top app bar.

Link copied to clipboard

The top app bar's current height offset in pixels. This height offset is applied to the fixed height of the app bar to control the displayed height when content is being scrolled.

Link copied to clipboard

The top app bar's height offset limit in pixels, which represents the limit that a top app bar is allowed to collapse to.

Link copied to clipboard

A value that represents the percentage of the app bar area that is overlapping with the content scrolled behind it.