ExitAlwaysFloatingToolbarScrollBehavior

class ExitAlwaysFloatingToolbarScrollBehavior(val exitDirection: FloatingToolbarExitDirection, val state: FloatingToolbarState, val snapAnimationSpec: AnimationSpec<Float>, val flingAnimationSpec: DecayAnimationSpec<Float>) : FloatingToolbarScrollBehavior

A FloatingToolbarScrollBehavior that adjusts its properties to affect the size of a floating toolbar.

A floating toolbar that is set up with this FloatingToolbarScrollBehavior will immediately collapse when the nested content is pulled up, and will immediately appear when the content is pulled down.

Parameters

exitDirection

indicates the direction towards which the floating toolbar exits the screen

snapAnimationSpec

an AnimationSpec that defines how the floating toolbar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position

flingAnimationSpec

an DecayAnimationSpec that defines how to fling the floating toolbar when the user flings the toolbar itself, or the content below it

Constructors

Link copied to clipboard
constructor(exitDirection: FloatingToolbarExitDirection, state: FloatingToolbarState, snapAnimationSpec: AnimationSpec<Float>, flingAnimationSpec: DecayAnimationSpec<Float>)

Properties

Link copied to clipboard
Link copied to clipboard
open override val flingAnimationSpec: DecayAnimationSpec<Float>
Link copied to clipboard
open override val snapAnimationSpec: AnimationSpec<Float>
Link copied to clipboard
open override val state: FloatingToolbarState

Functions

Link copied to clipboard
open override fun Modifier.floatingScrollBehavior(): Modifier

A Modifier that is attached to this behavior.

Link copied to clipboard
open suspend override fun onPostFling(consumed: Velocity, available: Velocity): Velocity
Link copied to clipboard
open override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset
Link copied to clipboard
open suspend fun onPreFling(available: Velocity): Velocity
Link copied to clipboard
open fun onPreScroll(available: Offset, source: NestedScrollSource): Offset