Skip to content

Commit 260cfcd

Browse files
authored
Pesto: Prevent overscrolling on recipe page. (#5237)
BUG=#5098
1 parent 4a8dbb0 commit 260cfcd

1 file changed

Lines changed: 23 additions & 20 deletions

File tree

‎examples/flutter_gallery/lib/demo/pesto_demo.dart‎

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -345,27 +345,30 @@ class _RecipePageState extends State<_RecipePage> {
345345
)
346346
)
347347
),
348-
new ScrollableViewport(
349-
child: new RepaintBoundary(
350-
child: new Padding(
351-
padding: new EdgeInsets.only(top: appBarHeight),
352-
child: new Stack(
353-
children: <Widget>[
354-
new Padding(
355-
padding: new EdgeInsets.only(top: fabHalfSize),
356-
child: new SizedBox(
357-
width: fullWidth ? null : _kRecipePageMaxWidth,
358-
child: new _RecipeSheet(recipe: config.recipe)
359-
)
360-
),
361-
new Positioned(
362-
right: 16.0,
363-
child: new FloatingActionButton(
364-
child: new Icon(isFavorite ? Icons.favorite : Icons.favorite_border),
365-
onPressed: _toggleFavorite
348+
new ClampOverscrolls(
349+
value: true,
350+
child: new ScrollableViewport(
351+
child: new RepaintBoundary(
352+
child: new Padding(
353+
padding: new EdgeInsets.only(top: appBarHeight),
354+
child: new Stack(
355+
children: <Widget>[
356+
new Padding(
357+
padding: new EdgeInsets.only(top: fabHalfSize),
358+
child: new SizedBox(
359+
width: fullWidth ? null : _kRecipePageMaxWidth,
360+
child: new _RecipeSheet(recipe: config.recipe)
361+
)
362+
),
363+
new Positioned(
364+
right: 16.0,
365+
child: new FloatingActionButton(
366+
child: new Icon(isFavorite ? Icons.favorite : Icons.favorite_border),
367+
onPressed: _toggleFavorite
368+
)
366369
)
367-
)
368-
]
370+
]
371+
)
369372
)
370373
)
371374
)

0 commit comments

Comments
 (0)