flutter/examples/api/lib/widgets/sliver
Hans Muller 9ce0a9e510
PinnedHeaderSliver (#143196)
A sliver that remains “pinned” to the top of the scroll view. Subsequent slivers scroll behind it. Typically the sliver is created as the first item in the list however it can be inserted anywhere and it will always stop at the top of the scroll view. When the scrolling axis is vertical, the PinnedHeaderSliver’s height is defined by its widget child. Multiple PinnedHeaderSlivers will layout one after the other, once they've scrolled to the top.

This sliver is preferable to the general purpose SliverPersistentHeader - for its relatively narrow use case - because there's no need to create a [SliverPersistentHeaderDelegate] or to predict the header's size.

Here's a [working demo in DartPad](https://dartpad.dev/?id=3b3f24c14fa201f752407a21ca9c9456).

https://github.com/flutter/flutter/assets/1377460/943f2e02-8e73-48b7-90be-61168978ff71

Related sliver utility PRs: https://github.com/flutter/flutter/pull/143538, https://github.com/flutter/flutter/pull/143325, https://github.com/flutter/flutter/pull/127340.
2024-06-07 21:27:06 +00:00
..
decorated_sliver.0.dart Fix DecoratedSliver sample code to reflect the description (#148621) 2024-05-23 08:52:15 +00:00
pinned_header_sliver.0.dart PinnedHeaderSliver (#143196) 2024-06-07 21:27:06 +00:00
sliver_constrained_cross_axis.0.dart Sliver Constrained Cross Axis (#125239) 2023-04-24 23:17:36 +00:00
sliver_cross_axis_group.0.dart Sliver Cross Axis Group (#123862) 2023-04-28 23:41:58 +00:00
sliver_main_axis_group.0.dart Sliver Main Axis Group (#126596) 2023-06-08 15:54:09 -07:00
sliver_opacity.1.dart Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
sliver_resizing_header.0.dart SliverResizingHeader (#143325) 2024-06-06 22:35:12 +00:00