@@ -35,6 +35,9 @@ void _showActionSheet(
35
35
BuildContext pageContext, {
36
36
required List <Widget > optionButtons,
37
37
}) {
38
+ // Could omit this if we need _showActionSheet outside a per-account context.
39
+ final accountId = PerAccountStoreWidget .accountIdOf (pageContext);
40
+
38
41
showModalBottomSheet <void >(
39
42
context: pageContext,
40
43
// Clip.hardEdge looks bad; Clip.antiAliasWithSaveLayer looks pixel-perfect
@@ -45,34 +48,36 @@ void _showActionSheet(
45
48
isScrollControlled: true ,
46
49
builder: (BuildContext _) {
47
50
final designVariables = DesignVariables .of (pageContext);
48
- return Semantics (
49
- role: SemanticsRole .menu,
50
- child: SafeArea (
51
- minimum: const EdgeInsets .only (bottom: 16 ),
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
- ])));
51
+ return PerAccountStoreWidget (
52
+ accountId: accountId,
53
+ child: Semantics (
54
+ role: SemanticsRole .menu,
55
+ child: SafeArea (
56
+ minimum: const EdgeInsets .only (bottom: 16 ),
57
+ child: Column (
58
+ mainAxisSize: MainAxisSize .min,
59
+ children: [
60
+ SizedBox (height: 8 ),
61
+ Flexible (
62
+ child: Padding (
63
+ padding: const EdgeInsets .fromLTRB (16 , 0 , 16 , 0 ),
64
+ child: Column (
65
+ crossAxisAlignment: CrossAxisAlignment .stretch,
66
+ mainAxisSize: MainAxisSize .min,
67
+ children: [
68
+ // TODO(#217): show message text
69
+ Flexible (child: InsetShadowBox (
70
+ top: 8 , bottom: 8 ,
71
+ color: designVariables.bgContextMenu,
72
+ child: SingleChildScrollView (
73
+ padding: const EdgeInsets .symmetric (vertical: 8 ),
74
+ child: ClipRRect (
75
+ borderRadius: BorderRadius .circular (7 ),
76
+ child: Column (spacing: 1 ,
77
+ children: optionButtons))))),
78
+ const ActionSheetCancelButton (),
79
+ ]))),
80
+ ]))));
76
81
});
77
82
}
78
83
0 commit comments