mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() A relatively elaborate PinnedSliverHeader example which creates an app bar that's similar to the one that appears in the iOS Settings app. In this example the pinned header starts out transparent and the first item in the list serves as the app's "Settings" title. When the title item has been scrolled completely behind the pinned header, the header animates its opacity from 0 to 1 and its (centered) "Settings" title appears. The fact that the header's opacity depends on the height of the title item - which is unknown until the list has been laid out - necessitates monitoring its SliverConstraints.scrollExtent from a scroll NotificationListener. https://github.com/flutter/flutter/assets/1377460/539e2591-d0d7-4508-8ce8-4b8f587d7648 |
||
---|---|---|
.. | ||
decorated_sliver.0.dart | ||
pinned_header_sliver.0.dart | ||
pinned_header_sliver.1.dart | ||
sliver_constrained_cross_axis.0.dart | ||
sliver_cross_axis_group.0.dart | ||
sliver_floating_header.0.dart | ||
sliver_main_axis_group.0.dart | ||
sliver_opacity.1.dart | ||
sliver_resizing_header.0.dart | ||
sliver_tree.0.dart | ||
sliver_tree.1.dart |