Unverified Commit 6494dde3 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Apply media padding in Gallery Shrine demo (#14506)

Applies horizontal and bottom safe area insets to the Shrine demo in the
Gallery. Top insets are not applied due to the presence of the
omnipresent sliver app bar. Specifically, this ensures that the grid
cards are inset inside the iPhone X notch in horizontal mode, and that
the bottom of the grid is positioned above the iOS home indicator.
parent 8a2df396
......@@ -388,11 +388,10 @@ class _ShrineHomeState extends State<ShrineHome> {
shoppingCart: _shoppingCart,
body: new CustomScrollView(
slivers: <Widget>[
new SliverToBoxAdapter(
child: new _Heading(product: featured),
),
new SliverPadding(
padding: const EdgeInsets.all(16.0),
new SliverToBoxAdapter(child: new _Heading(product: featured)),
new SliverSafeArea(
top: false,
minimum: const EdgeInsets.all(16.0),
sliver: new SliverGrid(
gridDelegate: gridDelegate,
delegate: new SliverChildListDelegate(
......
......@@ -287,8 +287,9 @@ class _OrderPageState extends State<OrderPage> {
quantityChanged: (int value) { updateOrder(quantity: value); },
),
),
new SliverPadding(
padding: const EdgeInsets.fromLTRB(8.0, 32.0, 8.0, 8.0),
new SliverSafeArea(
top: false,
minimum: const EdgeInsets.fromLTRB(8.0, 32.0, 8.0, 8.0),
sliver: new SliverGrid(
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 248.0,
......
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