diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart index e668119636d..fa8fcd6793b 100644 --- a/examples/flutter_gallery/lib/gallery/home.dart +++ b/examples/flutter_gallery/lib/gallery/home.dart @@ -245,6 +245,9 @@ class _DemosPage extends StatelessWidget { @override Widget build(BuildContext context) { + // When overriding ListView.padding, it's necessary to manually handle + // safe areas. + final double windowBottomPadding = MediaQuery.of(context).padding.bottom; return new KeyedSubtree( key: const ValueKey('GalleryDemoList'), // So the tests can find this ListView child: new Semantics( @@ -254,7 +257,7 @@ class _DemosPage extends StatelessWidget { explicitChildNodes: true, child: new ListView( key: new PageStorageKey(category.name), - padding: const EdgeInsets.only(top: 8.0), + padding: new EdgeInsets.only(top: 8.0, bottom: windowBottomPadding), children: kGalleryCategoryToDemos[category].map((GalleryDemo demo) { return new _DemoItem(demo: demo); }).toList(),