flutter/examples/api/lib/widgets/sliver
Hans Muller 7e3e30929a
SliverResizingHeader (#143325)
A sliver that is pinned to the start of its `CustomScrollView` and reacts to scrolling by resizing between the intrinsic sizes of its min and max extent prototypes.

The minimum and maximum sizes of this sliver are defined by `minExtentPrototype` and `maxExtentPrototype`, a pair of widgets that are laid out once. You can use `SizedBox` widgets to define the size limits.

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 minimum or maximum size.

The sample shows how this sliver's two extent prototype properties can be used to create a resizing header whose minimum and maximum sizes match small and large configurations of the same header widget.

https://github.com/flutter/flutter/assets/1377460/fa7ced98-9d92-4d13-b093-50392118c213

Related sliver utility PRs: https://github.com/flutter/flutter/pull/143538, https://github.com/flutter/flutter/pull/143196, https://github.com/flutter/flutter/pull/127340.
2024-06-06 22:35:12 +00:00
..
decorated_sliver.0.dart Fix DecoratedSliver sample code to reflect the description (#148621) 2024-05-23 08:52:15 +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