snap property

bool snap

If snap and floating are true then the floating app bar will "snap" into view.

If snap is true then a scroll that exposes the floating app bar will trigger an animation that slides the entire app bar into view. Similarly if a scroll dismisses the app bar, the animation will slide the app bar completely out of view.

Snapping only applies when the app bar is floating, not when the app bar appears at the top of its scroll view.

Animated Examples

The following animations show how the app bar changes its scrolling behavior based on the value of this property.

  • App bar with snap set to false:
  • App bar with snap set to true:

See also:

  • SliverAppBar for more animated examples of how this property changes the behavior of the app bar in combination with pinned and floating.


final bool snap