Commit 6d8930e4 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Animation demo scrolling (#9804)

parent e504dabd
...@@ -478,9 +478,7 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> { ...@@ -478,9 +478,7 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> {
final Iterable<Widget> detailItems = section.details.map((SectionDetail detail) { final Iterable<Widget> detailItems = section.details.map((SectionDetail detail) {
return new SectionDetailView(detail: detail); return new SectionDetailView(detail: detail);
}); });
return ListTile.divideTiles(context: context, tiles: detailItems).map((Widget item) { return ListTile.divideTiles(context: context, tiles: detailItems);
return new SliverToBoxAdapter(child: item);
});
} }
Iterable<Widget> _allHeadingItems(double maxHeight, double midScrollOffset) { Iterable<Widget> _allHeadingItems(double maxHeight, double midScrollOffset) {
...@@ -571,8 +569,9 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> { ...@@ -571,8 +569,9 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> {
child: new PageView( child: new PageView(
controller: _detailsPageController, controller: _detailsPageController,
children: allSections.map((Section section) { children: allSections.map((Section section) {
return new CustomScrollView( return new Column(
slivers: _detailItemsFor(section).toList(), crossAxisAlignment: CrossAxisAlignment.stretch,
children: _detailItemsFor(section).toList(),
); );
}).toList(), }).toList(),
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment