mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
This commit is contained in:
parent
8a2df39662
commit
6494dde364
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user