diff --git a/lib/screens/categories/category_streams_list/category_streams.dart b/lib/screens/categories/category_streams_list/category_streams.dart index 27316263..333e0246 100644 --- a/lib/screens/categories/category_streams_list/category_streams.dart +++ b/lib/screens/categories/category_streams_list/category_streams.dart @@ -11,51 +11,49 @@ class CategoryStreams extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - body: RefreshIndicator( - onRefresh: store.refresh, - child: Observer( - builder: (_) { - return CustomScrollView( - physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()), - slivers: [ - SliverAppBar( - stretch: true, - pinned: true, - expandedHeight: MediaQuery.of(context).size.height / 3, - flexibleSpace: FlexibleSpaceBar( - title: Text( - store.categoryInfo.name, - style: Theme.of(context).textTheme.headline6?.copyWith(fontWeight: FontWeight.bold), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - background: Hero( - tag: store.categoryInfo.id, - child: CachedNetworkImage( - imageUrl: store.categoryInfo.boxArtUrl.replaceFirst('-{width}x{height}', '-300x400'), - color: const Color.fromRGBO(255, 255, 255, 0.5), - colorBlendMode: BlendMode.modulate, - fit: BoxFit.cover, - ), + return RefreshIndicator( + onRefresh: store.refresh, + child: Observer( + builder: (_) { + return CustomScrollView( + physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()), + slivers: [ + SliverAppBar( + stretch: true, + pinned: true, + expandedHeight: MediaQuery.of(context).size.height / 3, + flexibleSpace: FlexibleSpaceBar( + title: Text( + store.categoryInfo.name, + style: Theme.of(context).textTheme.headline6?.copyWith(fontWeight: FontWeight.bold), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + background: Hero( + tag: store.categoryInfo.id, + child: CachedNetworkImage( + imageUrl: store.categoryInfo.boxArtUrl.replaceFirst('-{width}x{height}', '-300x400'), + color: const Color.fromRGBO(255, 255, 255, 0.5), + colorBlendMode: BlendMode.modulate, + fit: BoxFit.cover, ), ), ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - if (index > store.streams.length / 2 && store.hasMore) { - store.getStreams(); - } - return StreamCard(streamInfo: store.streams[index]); - }, - childCount: store.streams.length, - ), + ), + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + if (index > store.streams.length / 2 && store.hasMore) { + store.getStreams(); + } + return StreamCard(streamInfo: store.streams[index]); + }, + childCount: store.streams.length, ), - ], - ); - }, - ), + ), + ], + ); + }, ), ); } diff --git a/lib/screens/home/home.dart b/lib/screens/home/home.dart index 2c8b3c40..6a7e8533 100644 --- a/lib/screens/home/home.dart +++ b/lib/screens/home/home.dart @@ -66,18 +66,20 @@ class Home extends StatelessWidget { ) ], ), - body: Observer( - builder: (_) { - return IndexedStack( - index: homeStore.selectedIndex, - children: [ - if (authStore.isLoggedIn) FollowedStreams(store: followedStreamsStore), - TopStreams(store: topStreamsStore), - Categories(store: categoriesStore), - Search(searchStore: searchStore), - ], - ); - }, + body: SafeArea( + child: Observer( + builder: (_) { + return IndexedStack( + index: homeStore.selectedIndex, + children: [ + if (authStore.isLoggedIn) FollowedStreams(store: followedStreamsStore), + TopStreams(store: topStreamsStore), + Categories(store: categoriesStore), + Search(searchStore: searchStore), + ], + ); + }, + ), ), bottomNavigationBar: Observer( builder: (_) {