FloatingAppBarState


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

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

Summary

Public properties

Float

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

Cmn
Float

The floating app bar's current offset in pixels.

Cmn
Float

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

Cmn

Public properties

contentOffset

var contentOffsetFloat

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

This value is updated by a FloatingAppBarScrollBehavior whenever a nested scroll connection consumes scroll events. A common implementation would update the value to be the sum of all NestedScrollConnection.onPostScroll consumed values.

offset

var offsetFloat

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

Updates to the offset value are coerced between zero and offsetLimit.

offsetLimit

var offsetLimitFloat

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

Use this limit to coerce the offset value when it's updated.