@@ -475,6 +475,7 @@ void showChannelActionSheet(BuildContext context, {
475475 bool showTopicListButton = true ,
476476}) {
477477 final pageContext = PageRoot .contextOf (context);
478+ final zulipLocalizations = ZulipLocalizations .of (pageContext);
478479 final store = PerAccountStoreWidget .of (pageContext);
479480 final messageListPageState = MessageListPage .maybeAncestorOf (pageContext);
480481
@@ -502,7 +503,31 @@ void showChannelActionSheet(BuildContext context, {
502503 [UnsubscribeButton (pageContext: pageContext, channelId: channelId)],
503504 ];
504505
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);
506531}
507532
508533class SubscribeButton extends ActionSheetMenuItemButton {
0 commit comments