@@ -37,7 +37,7 @@ import 'topic_list.dart';
3737void _showActionSheet (
3838 BuildContext pageContext, {
3939 Widget ? header,
40- required List <Widget > optionButtons ,
40+ required List <List < Widget >> buttonSections ,
4141}) {
4242 // Could omit this if we need _showActionSheet outside a per-account context.
4343 final accountId = PerAccountStoreWidget .accountIdOf (pageContext);
@@ -91,7 +91,11 @@ void _showActionSheet(
9191 color: designVariables.bgContextMenu,
9292 child: SingleChildScrollView (
9393 padding: const EdgeInsets .symmetric (vertical: 8 ),
94- child: MenuButtonsShape (buttons: optionButtons)))),
94+ child: Column (
95+ mainAxisSize: MainAxisSize .min,
96+ spacing: 8 ,
97+ children: buttonSections.map ((buttons) =>
98+ MenuButtonsShape (buttons: buttons)).toList ())))),
9599 const BottomSheetDismissButton (style: BottomSheetDismissButtonStyle .cancel),
96100 ]))),
97101 ]))));
@@ -255,7 +259,7 @@ void showChannelActionSheet(BuildContext context, {
255259 optionButtons.add (
256260 CopyChannelLinkButton (channelId: channelId, pageContext: pageContext));
257261
258- _showActionSheet (pageContext, optionButtons : optionButtons);
262+ _showActionSheet (pageContext, buttonSections : [ optionButtons] );
259263}
260264
261265class MarkChannelAsReadButton extends ActionSheetMenuItemButton {
@@ -440,7 +444,7 @@ void showTopicActionSheet(BuildContext context, {
440444 narrow: TopicNarrow (channelId, topic, with_: someMessageIdInTopic),
441445 pageContext: context));
442446
443- _showActionSheet (pageContext, optionButtons : optionButtons);
447+ _showActionSheet (pageContext, buttonSections : [ optionButtons] );
444448}
445449
446450class UserTopicUpdateButton extends ActionSheetMenuItemButton {
@@ -732,7 +736,7 @@ void showMessageActionSheet({required BuildContext context, required Message mes
732736 ];
733737
734738 _showActionSheet (pageContext,
735- optionButtons : optionButtons,
739+ buttonSections : [ optionButtons] ,
736740 header: _MessageActionSheetHeader (message: message));
737741}
738742
0 commit comments