@@ -313,20 +313,42 @@ class MessageListAppBarTitle extends StatelessWidget {
313
313
314
314
Widget _buildStreamRow (BuildContext context, {
315
315
ZulipStream ? stream,
316
- required String text,
317
316
}) {
318
- // A null [Icon.icon] makes a blank space.
319
- final icon = (stream != null ) ? iconDataForStream (stream) : null ;
320
- return Row (
317
+ final icon = (stream == null ) ? ZulipIcons .hash_sign : iconDataForStream (stream);
318
+ Widget result = Row (
321
319
mainAxisSize: MainAxisSize .min,
322
320
// TODO(design): The vertical alignment of the stream privacy icon is a bit ad hoc.
323
321
// For screenshots of some experiments, see:
324
322
// https://github.com/zulip/zulip-flutter/pull/219#discussion_r1281024746
325
323
crossAxisAlignment: CrossAxisAlignment .center,
326
324
children: [
327
- Icon (size: 16 , icon),
328
- const SizedBox (width: 4 ),
329
- Flexible (child: Text (text)),
325
+ Padding (padding: const EdgeInsetsDirectional .only (end: 8.0 ),
326
+ child: Icon (size: 20 , icon)),
327
+ Flexible (child: Text (stream? .name ?? '(unknown stream)' ,
328
+ style: const TextStyle (
329
+ fontSize: 20 ,
330
+ ).merge (weightVariableTextStyle (context)))),
331
+ ]);
332
+
333
+ return result;
334
+ }
335
+
336
+ Widget _buildTopicRow (BuildContext context, {
337
+ required ZulipStream ? stream,
338
+ required String topic,
339
+ }) {
340
+ final store = PerAccountStoreWidget .of (context);
341
+ final icon = (stream == null ) ? null
342
+ : iconDataForTopic (store.topicVisibilityPolicy (stream.streamId, topic));
343
+ return Row (
344
+ children: [
345
+ Flexible (child: Text (topic, style: const TextStyle (
346
+ fontSize: 13 ,
347
+ ).merge (weightVariableTextStyle (context)))),
348
+ if (icon != null )
349
+ Padding (
350
+ padding: const EdgeInsetsDirectional .only (start: 4 ),
351
+ child: Opacity (opacity: 0.4 , child: Icon (icon, size: 14 ))),
330
352
]);
331
353
}
332
354
@@ -347,21 +369,24 @@ class MessageListAppBarTitle extends StatelessWidget {
347
369
case ChannelNarrow (: var streamId):
348
370
final store = PerAccountStoreWidget .of (context);
349
371
final stream = store.streams[streamId];
350
- final streamName = stream? .name ?? '(unknown channel)' ;
351
- return _buildStreamRow (context, stream: stream, text: streamName);
372
+ return _buildStreamRow (context, stream: stream);
352
373
353
374
case TopicNarrow (: var streamId, : var topic):
354
375
final store = PerAccountStoreWidget .of (context);
355
376
final stream = store.streams[streamId];
356
- final streamName = stream ? .name ?? '(unknown channel)' ;
377
+
357
378
return SizedBox (
358
379
width: double .infinity,
359
380
child: GestureDetector (
360
381
behavior: HitTestBehavior .translucent,
361
382
onLongPress: () => showTopicActionSheet (context,
362
383
channelId: streamId, topic: topic),
363
- child: _buildStreamRow (
364
- context, stream: stream, text: "$streamName > $topic " )));
384
+ child: Column (
385
+ crossAxisAlignment: CrossAxisAlignment .start,
386
+ children: [
387
+ _buildStreamRow (context, stream: stream),
388
+ _buildTopicRow (context, stream: stream, topic: topic),
389
+ ])));
365
390
366
391
case DmNarrow (: var otherRecipientIds):
367
392
final store = PerAccountStoreWidget .of (context);
0 commit comments