@@ -475,6 +475,7 @@ void showChannelActionSheet(BuildContext context, {
475
475
bool showTopicListButton = true ,
476
476
}) {
477
477
final pageContext = PageRoot .contextOf (context);
478
+ final zulipLocalizations = ZulipLocalizations .of (pageContext);
478
479
final store = PerAccountStoreWidget .of (pageContext);
479
480
final messageListPageState = MessageListPage .maybeAncestorOf (pageContext);
480
481
@@ -502,7 +503,31 @@ void showChannelActionSheet(BuildContext context, {
502
503
[UnsubscribeButton (pageContext: pageContext, channelId: channelId)],
503
504
];
504
505
505
- _showActionSheet (pageContext, buttonSections: buttonSections);
506
+ Widget header;
507
+ if (channel == null ) {
508
+ header = BottomSheetHeader (title: zulipLocalizations.unknownChannelName);
509
+ } else {
510
+ final channelIconColor = colorSwatchFor (context,
511
+ store.subscriptions[channelId]).iconOnPlainBackground;
512
+ final icon = iconDataForStream (channel);
513
+
514
+ header = BottomSheetHeader (
515
+ buildTitle: (baseStyle) => Row (
516
+ spacing: 4 ,
517
+ mainAxisSize: MainAxisSize .min,
518
+ // TODO(design): The vertical alignment of the stream privacy icon is a bit ad hoc.
519
+ crossAxisAlignment: CrossAxisAlignment .center,
520
+ children: [
521
+ Icon (size: baseStyle.fontSize, color: channelIconColor, icon),
522
+ Flexible (child: Text (style: baseStyle,
523
+ channel.name)),
524
+ ]));
525
+ }
526
+
527
+ _showActionSheet (pageContext,
528
+ header: header,
529
+ headerScrollable: false ,
530
+ buttonSections: buttonSections);
506
531
}
507
532
508
533
class SubscribeButton extends ActionSheetMenuItemButton {
0 commit comments