diff --git a/lib/pages/chat_page.dart b/lib/pages/chat_page.dart index 94a300a..9d64851 100644 --- a/lib/pages/chat_page.dart +++ b/lib/pages/chat_page.dart @@ -1227,6 +1227,14 @@ class _ChatPageState extends State { parent: AlwaysScrollableScrollPhysics(), ), slivers: [ + // The body sits behind the translucent app bar, so the conversation + // has to start below it: without this the avatar header and the first + // day separator are painted under the bar. + SliverToBoxAdapter( + child: SizedBox( + height: MediaQuery.viewPaddingOf(context).top + kToolbarHeight, + ), + ), SliverToBoxAdapter( child: hasOlder ? const Padding( diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index c99393e..5951ed3 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -399,6 +399,9 @@ class _HomePageState extends State physics: const BouncingScrollPhysics( parent: AlwaysScrollableScrollPhysics(), ), + // The chips already clear the app bar; a scroll view's automatic + // MediaQuery padding would add a second gap above the first row. + padding: EdgeInsets.zero, itemCount: chats.length, itemBuilder: (context, index) { // Indexed access: `Map.entries.elementAt` is O(n) and made the list @@ -543,8 +546,14 @@ class _HomePageState extends State // Messages Column( children: [ - SizedBox(height: 10), - _filterChips(), + // The body sits behind the translucent app bar; the chips do not + // scroll, so they start below it. + Padding( + padding: EdgeInsets.only( + top: MediaQuery.viewPaddingOf(context).top + kToolbarHeight, + ), + child: _filterChips(), + ), // Messages and avatar list Expanded( child: _firstLoad