From 895bc6345adf9ddf3a77dd8feb0cd56743e6f0e1 Mon Sep 17 00:00:00 2001 From: Alexis Berkenstock Date: Fri, 14 Dec 2018 21:48:14 -0800 Subject: [PATCH] Add safe area to media backdrop Provides padding for notched displays. #21 --- lib/widgets/media_detail/media_detail.dart | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/widgets/media_detail/media_detail.dart b/lib/widgets/media_detail/media_detail.dart index 03bffed..f86d590 100644 --- a/lib/widgets/media_detail/media_detail.dart +++ b/lib/widgets/media_detail/media_detail.dart @@ -85,12 +85,17 @@ class MediaDetailScreenState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: primary, - body: CustomScrollView( - slivers: [ - _buildAppBar(widget._mediaItem), - _buildContentSection(widget._mediaItem), - ], - )); + body: SafeArea( + top: true, + bottom: false, + child: CustomScrollView( + slivers: [ + _buildAppBar(widget._mediaItem), + _buildContentSection(widget._mediaItem), + ], + ), + ), + ); } Widget _buildAppBar(MediaItem movie) {