Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/pages/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,14 @@ class _ChatPageState extends State<ChatPage> {
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(
Expand Down
13 changes: 11 additions & 2 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ class _HomePageState extends State<HomePage>
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
Expand Down Expand Up @@ -543,8 +546,14 @@ class _HomePageState extends State<HomePage>
// 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
Expand Down
Loading