From 260cfcdb7b8993d281336163a1c75e14f52ae87d Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Fri, 5 Aug 2016 13:37:27 -0400 Subject: [PATCH] Pesto: Prevent overscrolling on recipe page. (#5237) BUG=https://github.com/flutter/flutter/issues/5098 --- .../flutter_gallery/lib/demo/pesto_demo.dart | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart index 86f686da50..2704eac92e 100644 --- a/examples/flutter_gallery/lib/demo/pesto_demo.dart +++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart @@ -345,27 +345,30 @@ class _RecipePageState extends State<_RecipePage> { ) ) ), - new ScrollableViewport( - child: new RepaintBoundary( - child: new Padding( - padding: new EdgeInsets.only(top: appBarHeight), - child: new Stack( - children: [ - new Padding( - padding: new EdgeInsets.only(top: fabHalfSize), - child: new SizedBox( - width: fullWidth ? null : _kRecipePageMaxWidth, - child: new _RecipeSheet(recipe: config.recipe) + new ClampOverscrolls( + value: true, + child: new ScrollableViewport( + child: new RepaintBoundary( + child: new Padding( + padding: new EdgeInsets.only(top: appBarHeight), + child: new Stack( + children: [ + new Padding( + padding: new EdgeInsets.only(top: fabHalfSize), + child: new SizedBox( + width: fullWidth ? null : _kRecipePageMaxWidth, + child: new _RecipeSheet(recipe: config.recipe) + ) + ), + new Positioned( + right: 16.0, + child: new FloatingActionButton( + child: new Icon(isFavorite ? Icons.favorite : Icons.favorite_border), + onPressed: _toggleFavorite + ) ) - ), - new Positioned( - right: 16.0, - child: new FloatingActionButton( - child: new Icon(isFavorite ? Icons.favorite : Icons.favorite_border), - onPressed: _toggleFavorite - ) - ) - ] + ] + ) ) ) )