Skip to content

Commit f66007c

Browse files
committed
action_sheet [nfc]: Refactor some vertical padding, toward header param
We're about to give _showActionSheet a `Widget? header` param, which we'll place as a child of this new Column.
1 parent 4149290 commit f66007c

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

lib/widgets/action_sheet.dart

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,30 @@ void _showActionSheet(
4949
role: SemanticsRole.menu,
5050
child: SafeArea(
5151
minimum: const EdgeInsets.only(bottom: 16),
52-
child: Padding(
53-
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
54-
child: Column(
55-
crossAxisAlignment: CrossAxisAlignment.stretch,
56-
mainAxisSize: MainAxisSize.min,
57-
children: [
58-
// TODO(#217): show message text
59-
Flexible(child: InsetShadowBox(
60-
top: 8, bottom: 8,
61-
color: designVariables.bgContextMenu,
62-
child: SingleChildScrollView(
63-
padding: const EdgeInsets.only(top: 16, bottom: 8),
64-
child: ClipRRect(
65-
borderRadius: BorderRadius.circular(7),
66-
child: Column(spacing: 1,
67-
children: optionButtons))))),
68-
const ActionSheetCancelButton(),
69-
]))));
52+
child: Column(
53+
mainAxisSize: MainAxisSize.min,
54+
children: [
55+
SizedBox(height: 8),
56+
Flexible(
57+
child: Padding(
58+
padding: const EdgeInsets.fromLTRB(16, 0, 16, 0),
59+
child: Column(
60+
crossAxisAlignment: CrossAxisAlignment.stretch,
61+
mainAxisSize: MainAxisSize.min,
62+
children: [
63+
// TODO(#217): show message text
64+
Flexible(child: InsetShadowBox(
65+
top: 8, bottom: 8,
66+
color: designVariables.bgContextMenu,
67+
child: SingleChildScrollView(
68+
padding: const EdgeInsets.symmetric(vertical: 8),
69+
child: ClipRRect(
70+
borderRadius: BorderRadius.circular(7),
71+
child: Column(spacing: 1,
72+
children: optionButtons))))),
73+
const ActionSheetCancelButton(),
74+
]))),
75+
])));
7076
});
7177
}
7278

0 commit comments

Comments
 (0)