Unverified Commit ece737d1 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Apply media padding to Gallery animation demo (#13853)

Applies horizontal safe area insets to the animation demo in the
Gallery. Specifically, this ensures the back button is positioned
consistently with iOS expectations and that that main image card in the
detail view respects safe area insets.

This is to support the iPhone X sensor housing notch and other similarly
creative display features when in landscape orientation.
parent 882eb24e
......@@ -610,12 +610,16 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> {
left: 0.0,
child: new IconTheme(
data: const IconThemeData(color: Colors.white),
child: new IconButton(
icon: const BackButtonIcon(),
tooltip: 'Back',
onPressed: () {
_handleBackButton(appBarMidScrollOffset);
}
child: new SafeArea(
top: false,
bottom: false,
child: new IconButton(
icon: const BackButtonIcon(),
tooltip: 'Back',
onPressed: () {
_handleBackButton(appBarMidScrollOffset);
}
),
),
),
),
......
......@@ -142,7 +142,7 @@ class SectionDetailView extends StatelessWidget {
item = new Container(
height: 240.0,
padding: const EdgeInsets.all(16.0),
child: image,
child: new SafeArea(top: false, bottom:false, child: image),
);
} else {
item = new ListTile(
......
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