Skip to content

Commit 157dccb

Browse files
Merge pull request #1155 from cypherstack/safearea-fixes
fix missing safearea wraps
2 parents c571086 + bbbea43 commit 157dccb

File tree

2 files changed

+353
-354
lines changed

2 files changed

+353
-354
lines changed

lib/pages/add_wallet_views/restore_wallet_view/sub_widgets/mnemonic_word_count_select_sheet.dart

Lines changed: 104 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ import '../../../../utilities/constants.dart';
1717
import '../../../../utilities/text_styles.dart';
1818

1919
class MnemonicWordCountSelectSheet extends ConsumerWidget {
20-
const MnemonicWordCountSelectSheet({
21-
super.key,
22-
required this.lengthOptions,
23-
});
20+
const MnemonicWordCountSelectSheet({super.key, required this.lengthOptions});
2421

2522
final List<int> lengthOptions;
2623

@@ -35,9 +32,7 @@ class MnemonicWordCountSelectSheet extends ConsumerWidget {
3532
child: Container(
3633
decoration: BoxDecoration(
3734
color: Theme.of(context).extension<StackColors>()!.popupBG,
38-
borderRadius: const BorderRadius.vertical(
39-
top: Radius.circular(20),
40-
),
35+
borderRadius: const BorderRadius.vertical(top: Radius.circular(20)),
4136
),
4237
child: Padding(
4338
padding: const EdgeInsets.only(
@@ -46,116 +41,115 @@ class MnemonicWordCountSelectSheet extends ConsumerWidget {
4641
top: 10,
4742
bottom: 0,
4843
),
49-
child: Column(
50-
mainAxisSize: MainAxisSize.min,
51-
crossAxisAlignment: CrossAxisAlignment.start,
52-
children: [
53-
Center(
54-
child: Container(
55-
decoration: BoxDecoration(
56-
color: Theme.of(context)
57-
.extension<StackColors>()!
58-
.textFieldDefaultBG,
59-
borderRadius: BorderRadius.circular(
60-
Constants.size.circularBorderRadius,
44+
child: SafeArea(
45+
child: Column(
46+
mainAxisSize: MainAxisSize.min,
47+
crossAxisAlignment: CrossAxisAlignment.start,
48+
children: [
49+
Center(
50+
child: Container(
51+
decoration: BoxDecoration(
52+
color:
53+
Theme.of(
54+
context,
55+
).extension<StackColors>()!.textFieldDefaultBG,
56+
borderRadius: BorderRadius.circular(
57+
Constants.size.circularBorderRadius,
58+
),
6159
),
60+
width: 60,
61+
height: 4,
6262
),
63-
width: 60,
64-
height: 4,
6563
),
66-
),
67-
const SizedBox(
68-
height: 36,
69-
),
70-
// Expanded(
71-
// child: SingleChildScrollView(
72-
// child:
73-
Column(
74-
crossAxisAlignment: CrossAxisAlignment.start,
75-
children: [
76-
Text(
77-
"Phrase length",
78-
style: STextStyles.pageTitleH2(context),
79-
textAlign: TextAlign.left,
80-
),
81-
const SizedBox(
82-
height: 16,
83-
),
84-
for (int i = 0; i < lengthOptions.length; i++)
85-
Column(
86-
children: [
87-
GestureDetector(
88-
onTap: () {
89-
final state = ref
90-
.read(mnemonicWordCountStateProvider.state)
91-
.state;
92-
if (state != lengthOptions[i]) {
93-
ref
94-
.read(mnemonicWordCountStateProvider.state)
95-
.state = lengthOptions[i];
96-
}
64+
const SizedBox(height: 36),
65+
// Expanded(
66+
// child: SingleChildScrollView(
67+
// child:
68+
Column(
69+
crossAxisAlignment: CrossAxisAlignment.start,
70+
children: [
71+
Text(
72+
"Phrase length",
73+
style: STextStyles.pageTitleH2(context),
74+
textAlign: TextAlign.left,
75+
),
76+
const SizedBox(height: 16),
77+
for (int i = 0; i < lengthOptions.length; i++)
78+
Column(
79+
children: [
80+
GestureDetector(
81+
onTap: () {
82+
final state =
83+
ref
84+
.read(
85+
mnemonicWordCountStateProvider.state,
86+
)
87+
.state;
88+
if (state != lengthOptions[i]) {
89+
ref
90+
.read(mnemonicWordCountStateProvider.state)
91+
.state = lengthOptions[i];
92+
}
9793

98-
Navigator.of(context).pop();
99-
},
100-
child: Container(
101-
color: Colors.transparent,
102-
child: Row(
103-
crossAxisAlignment: CrossAxisAlignment.center,
104-
children: [
105-
// Column(
106-
// mainAxisAlignment: MainAxisAlignment.start,
107-
// children: [
108-
SizedBox(
109-
width: 20,
110-
height: 20,
111-
child: Radio(
112-
activeColor: Theme.of(context)
113-
.extension<StackColors>()!
114-
.radioButtonIconEnabled,
115-
value: lengthOptions[i],
116-
groupValue: ref
117-
.watch(
118-
mnemonicWordCountStateProvider.state,
119-
)
120-
.state,
121-
onChanged: (x) {
122-
ref
123-
.read(
124-
mnemonicWordCountStateProvider
125-
.state,
126-
)
127-
.state = lengthOptions[i];
128-
Navigator.of(context).pop();
129-
},
94+
Navigator.of(context).pop();
95+
},
96+
child: Container(
97+
color: Colors.transparent,
98+
child: Row(
99+
crossAxisAlignment: CrossAxisAlignment.center,
100+
children: [
101+
// Column(
102+
// mainAxisAlignment: MainAxisAlignment.start,
103+
// children: [
104+
SizedBox(
105+
width: 20,
106+
height: 20,
107+
child: Radio(
108+
activeColor:
109+
Theme.of(context)
110+
.extension<StackColors>()!
111+
.radioButtonIconEnabled,
112+
value: lengthOptions[i],
113+
groupValue:
114+
ref
115+
.watch(
116+
mnemonicWordCountStateProvider
117+
.state,
118+
)
119+
.state,
120+
onChanged: (x) {
121+
ref
122+
.read(
123+
mnemonicWordCountStateProvider
124+
.state,
125+
)
126+
.state = lengthOptions[i];
127+
Navigator.of(context).pop();
128+
},
129+
),
130130
),
131-
),
132-
// ],
133-
// ),
134-
const SizedBox(
135-
width: 12,
136-
),
137-
Text(
138-
"${lengthOptions[i]} words",
139-
style: STextStyles.titleBold12(context),
140-
textAlign: TextAlign.left,
141-
),
142-
],
131+
// ],
132+
// ),
133+
const SizedBox(width: 12),
134+
Text(
135+
"${lengthOptions[i]} words",
136+
style: STextStyles.titleBold12(context),
137+
textAlign: TextAlign.left,
138+
),
139+
],
140+
),
143141
),
144142
),
145-
),
146-
const SizedBox(
147-
height: 16,
148-
),
149-
],
150-
),
151-
const SizedBox(
152-
height: 8,
153-
),
154-
],
155-
),
156-
// ),
157-
// )
158-
],
143+
const SizedBox(height: 16),
144+
],
145+
),
146+
const SizedBox(height: 8),
147+
],
148+
),
149+
// ),
150+
// )
151+
],
152+
),
159153
),
160154
),
161155
),

0 commit comments

Comments
 (0)