@@ -264,43 +264,47 @@ class _TopicItem extends StatelessWidget {
264264 topic: topic,
265265 someMessageIdInTopic: maxId),
266266 splashFactory: NoSplash .splashFactory,
267- child: Padding (padding: EdgeInsetsDirectional .fromSTEB (6 , 8 , 12 , 8 ),
268- child: Row (
269- spacing: 8 ,
270- // In the Figma design, the text and icons on the topic item row
271- // are aligned to the start on the cross axis
272- // (i.e., `align-items: flex-start`). The icons are padded down
273- // 2px relative to the start, to visibly sit on the baseline.
274- // To account for scaled text, we align everything on the row
275- // to [CrossAxisAlignment.center] instead ([Row]'s default),
276- // like we do for the topic items on the inbox page.
277- // TODO(#1528): align to baseline (and therefore to first line of
278- // topic name), but with adjustment for icons
279- // CZO discussion:
280- // https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/topic.20list.20item.20alignment/near/2173252
281- children: [
282- // A null [Icon.icon] makes a blank space.
283- _IconMarker (icon: topic.isResolved ? ZulipIcons .check : null ),
284- Expanded (child: Opacity (
285- opacity: opacity,
286- child: Text (
287- style: TextStyle (
288- fontSize: 17 ,
289- height: 20 / 17 ,
290- fontStyle: topic.displayName == null ? FontStyle .italic : null ,
291- color: designVariables.textMessage,
292- ),
293- maxLines: 3 ,
294- overflow: TextOverflow .ellipsis,
295- topic.unresolve ().displayName ?? store.realmEmptyTopicDisplayName))),
296- Opacity (opacity: opacity, child: Row (
297- spacing: 4 ,
298- children: [
299- if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
300- if (visibilityIcon != null ) _IconMarker (icon: visibilityIcon),
301- if (unreadCount > 0 ) _UnreadCountBadge (count: unreadCount),
302- ])),
303- ]))));
267+ child: ConstrainedBox (
268+ constraints: BoxConstraints (minHeight: 40 ),
269+ child: Padding (
270+ padding: EdgeInsetsDirectional .fromSTEB (6 , 4 , 12 , 4 ),
271+ child: Row (
272+ spacing: 8 ,
273+ // In the Figma design, the text and icons on the topic item row
274+ // are aligned to the start on the cross axis
275+ // (i.e., `align-items: flex-start`). The icons are padded down
276+ // 2px relative to the start, to visibly sit on the baseline.
277+ // To account for scaled text, we align everything on the row
278+ // to [CrossAxisAlignment.center] instead ([Row]'s default),
279+ // like we do for the topic items on the inbox page.
280+ // TODO(#1528): align to baseline (and therefore to first line of
281+ // topic name), but with adjustment for icons
282+ // CZO discussion:
283+ // https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/topic.20list.20item.20alignment/near/2173252
284+ children: [
285+ // A null [Icon.icon] makes a blank space.
286+ _IconMarker (icon: topic.isResolved ? ZulipIcons .check : null ),
287+ Expanded (child: Opacity (
288+ opacity: opacity,
289+ child: Text (
290+ style: TextStyle (
291+ fontSize: 17 ,
292+ height: 20 / 17 ,
293+ fontStyle: topic.displayName == null ? FontStyle .italic : null ,
294+ color: designVariables.textMessage,
295+ ),
296+ maxLines: 3 ,
297+ overflow: TextOverflow .ellipsis,
298+ topic.unresolve ().displayName ?? store.realmEmptyTopicDisplayName))),
299+ Opacity (opacity: opacity, child: Row (
300+ spacing: 4 ,
301+ children: [
302+ if (hasMention) const _IconMarker (icon: ZulipIcons .at_sign),
303+ if (visibilityIcon != null ) _IconMarker (icon: visibilityIcon),
304+ if (unreadCount > 0 ) _UnreadCountBadge (count: unreadCount),
305+ ])),
306+ ])),
307+ )));
304308 }
305309}
306310
0 commit comments