@@ -37,7 +37,7 @@ import 'topic_list.dart';
37
37
void _showActionSheet (
38
38
BuildContext pageContext, {
39
39
Widget ? header,
40
- required List <Widget > optionButtons ,
40
+ required List <List < Widget >> buttonSections ,
41
41
}) {
42
42
// Could omit this if we need _showActionSheet outside a per-account context.
43
43
final accountId = PerAccountStoreWidget .accountIdOf (pageContext);
@@ -91,7 +91,11 @@ void _showActionSheet(
91
91
color: designVariables.bgContextMenu,
92
92
child: SingleChildScrollView (
93
93
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 ())))),
95
99
const BottomSheetDismissButton (style: BottomSheetDismissButtonStyle .cancel),
96
100
]))),
97
101
]))));
@@ -255,7 +259,7 @@ void showChannelActionSheet(BuildContext context, {
255
259
optionButtons.add (
256
260
CopyChannelLinkButton (channelId: channelId, pageContext: pageContext));
257
261
258
- _showActionSheet (pageContext, optionButtons : optionButtons);
262
+ _showActionSheet (pageContext, buttonSections : [ optionButtons] );
259
263
}
260
264
261
265
class MarkChannelAsReadButton extends ActionSheetMenuItemButton {
@@ -440,7 +444,7 @@ void showTopicActionSheet(BuildContext context, {
440
444
narrow: TopicNarrow (channelId, topic, with_: someMessageIdInTopic),
441
445
pageContext: context));
442
446
443
- _showActionSheet (pageContext, optionButtons : optionButtons);
447
+ _showActionSheet (pageContext, buttonSections : [ optionButtons] );
444
448
}
445
449
446
450
class UserTopicUpdateButton extends ActionSheetMenuItemButton {
@@ -732,7 +736,7 @@ void showMessageActionSheet({required BuildContext context, required Message mes
732
736
];
733
737
734
738
_showActionSheet (pageContext,
735
- optionButtons : optionButtons,
739
+ buttonSections : [ optionButtons] ,
736
740
header: _MessageActionSheetHeader (message: message));
737
741
}
738
742
0 commit comments