@@ -99,6 +99,18 @@ class RenderStickyHeaderItem extends RenderProxyBox {
99
99
/// or if [scrollDirection] is horizontal then to the start in the
100
100
/// reading direction of the ambient [Directionality] .
101
101
/// It can be controlled with [reverseHeader] .
102
+ ///
103
+ /// Much like [ListView] , a [StickyHeaderListView] is basically
104
+ /// a [CustomScrollView] with a single sliver in its [CustomScrollView.slivers]
105
+ /// property.
106
+ /// For a [StickyHeaderListView] , that sliver is a [SliverStickyHeaderList] .
107
+ ///
108
+ /// If more than one sliver is needed, any code using [StickyHeaderListView]
109
+ /// can be ported to use [CustomScrollView] directly, in much the same way
110
+ /// as for code using [ListView] . See [ListView] for details.
111
+ ///
112
+ /// See also:
113
+ /// * [SliverStickyHeaderList] , which provides the sticky-header behavior.
102
114
class StickyHeaderListView extends BoxScrollView {
103
115
// Like ListView, but with sticky headers.
104
116
StickyHeaderListView ({
@@ -296,6 +308,10 @@ enum _HeaderGrowthPlacement {
296
308
growthEnd
297
309
}
298
310
311
+ /// A list sliver with sticky headers.
312
+ ///
313
+ /// This widget takes most of its behavior from [SliverList] ,
314
+ /// but adds sticky headers as described at [StickyHeaderListView] .
299
315
class SliverStickyHeaderList extends RenderObjectWidget {
300
316
SliverStickyHeaderList ({
301
317
super .key,
@@ -306,7 +322,16 @@ class SliverStickyHeaderList extends RenderObjectWidget {
306
322
delegate: delegate,
307
323
);
308
324
325
+ /// Whether the sticky header appears at the start or the end
326
+ /// in the scrolling direction.
327
+ ///
328
+ /// For example, if the enclosing [Viewport] has [Viewport.axisDirection]
329
+ /// of [AxisDirection.down] , then
330
+ /// [HeaderPlacement.scrollingStart] means the header appears at
331
+ /// the top of the viewport, and
332
+ /// [HeaderPlacement.scrollingEnd] means it appears at the bottom.
309
333
final HeaderPlacement headerPlacement;
334
+
310
335
final _SliverStickyHeaderListInner _child;
311
336
312
337
@override
0 commit comments