Skip to content

Commit b3551e6

Browse files
committed
recent_dm_conversations: Make rows white, like in Figma
I missed this in #249 and made the rows transparent, oops. So they were taking on the scaffold background color, 0xfffafafa a.k.a. ThemeData.canvasColor. (If we were using Material 3, the scaffold background color would be 0xfffefbff a.k.a. ThemeData.colorScheme.background. Neither color is correct for what the Figma actually specifies for the surface underneath this screen's scrollable content. That's 0xfff6f6f6, and we'll start using it soon.) The ink effect on touch was being enabled by the scaffold's underlying Material. To preserve the ink effect, use a Material here instead of e.g. a ColoredBox. See the design in Figma: https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=341%3A12378&mode=dev
1 parent 627515b commit b3551e6

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

lib/widgets/recent_dm_conversations.dart

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,34 +107,36 @@ class RecentDmConversationsItem extends StatelessWidget {
107107
child: Icon(ZulipIcons.group_dm, color: Colors.black.withOpacity(0.5))));
108108
}
109109

110-
return InkWell(
111-
onTap: () {
112-
Navigator.push(context,
113-
MessageListPage.buildRoute(context: context, narrow: narrow));
114-
},
115-
child: ConstrainedBox(constraints: const BoxConstraints(minHeight: 48),
116-
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
117-
Padding(padding: const EdgeInsetsDirectional.fromSTEB(12, 8, 0, 8),
118-
child: AvatarShape(size: 32, borderRadius: 3, child: avatar)),
119-
const SizedBox(width: 8),
120-
Expanded(child: Padding(
121-
padding: const EdgeInsets.symmetric(vertical: 4),
122-
child: Text(
123-
style: const TextStyle(
124-
fontFamily: 'Source Sans 3',
125-
fontSize: 17,
126-
height: (20 / 17),
127-
color: Color(0xFF222222),
128-
).merge(weightVariableTextStyle(context)),
129-
maxLines: 2,
130-
overflow: TextOverflow.ellipsis,
131-
title))),
132-
const SizedBox(width: 12),
133-
unreadCount > 0
134-
? Padding(padding: const EdgeInsetsDirectional.only(end: 16),
110+
return Material(
111+
color: Colors.white,
112+
child: InkWell(
113+
onTap: () {
114+
Navigator.push(context,
115+
MessageListPage.buildRoute(context: context, narrow: narrow));
116+
},
117+
child: ConstrainedBox(constraints: const BoxConstraints(minHeight: 48),
118+
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
119+
Padding(padding: const EdgeInsetsDirectional.fromSTEB(12, 8, 0, 8),
120+
child: AvatarShape(size: 32, borderRadius: 3, child: avatar)),
121+
const SizedBox(width: 8),
122+
Expanded(child: Padding(
123+
padding: const EdgeInsets.symmetric(vertical: 4),
124+
child: Text(
125+
style: const TextStyle(
126+
fontFamily: 'Source Sans 3',
127+
fontSize: 17,
128+
height: (20 / 17),
129+
color: Color(0xFF222222),
130+
).merge(weightVariableTextStyle(context)),
131+
maxLines: 2,
132+
overflow: TextOverflow.ellipsis,
133+
title))),
134+
const SizedBox(width: 12),
135+
unreadCount > 0
136+
? Padding(padding: const EdgeInsetsDirectional.only(end: 16),
135137
child: UnreadCountBadge(baseStreamColor: null,
136138
count: unreadCount))
137139
: const SizedBox(),
138-
])));
140+
]))));
139141
}
140142
}

0 commit comments

Comments
 (0)