FloatingToolbarState


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

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

Summary

Public properties

Float

The total offset of the content scrolled under the floating toolbar.

Cmn
Float

The floating toolbar's current offset in pixels.

Cmn
Float

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

Cmn

Public properties

contentOffset

var contentOffsetFloat

The total offset of the content scrolled under the floating toolbar.

This value is updated by a FloatingToolbarScrollBehavior 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 toolbar's current offset in pixels. This offset is applied to the fixed size of the toolbar 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 toolbar's offset limit in pixels, which represents the limit that a floating toolbar is allowed to collapse to.

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