flutter/examples/api/lib
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
..
animation Implement new AnimationStatus getters (#148570) 2024-05-20 17:43:03 +00:00
cupertino Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
gestures Add an example for TapAndPanGestureRecognizer (#131873) 2023-08-09 19:59:03 +00:00
material Reverts "Introduce ChipAnimationStyle to override default chips animations durations (#149245)" (#149847) 2024-06-06 20:35:18 +00:00
painting switch expressions: finale (#148711) 2024-05-21 16:18:05 +00:00
rendering switch expressions: finale (#148711) 2024-05-21 16:18:05 +00:00
sample_templates Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
services Change some usage of RawKeyEvent to KeyEvent in preparation for deprecation (#136420) 2023-10-14 00:25:18 +00:00
ui/text Animate TextStyle.fontVariations (#138881) 2023-12-08 09:08:26 +00:00
widgets PinnedHeaderSliver (#143196) 2024-06-07 21:27:06 +00:00