52
}
53
54
@override
55
- Widget? leading(BuildContext context) =>
56
- isNewWalletCreated ? null: super.leading(context);
55
+ Widget? leading(BuildContext context) => isNewWalletCreated ? null : super.leading(context);
56
57
@override
58
Widget trailing(BuildContext context) {
66
margin: EdgeInsets.only(left: 10),
67
decoration: BoxDecoration(
68
borderRadius: BorderRadius.all(Radius.circular(16)),
70
- color: Theme.of(context)
71
- .accentTextTheme!
72
- .bodySmall!
73
- .color!),
69
+ color: Theme.of(context).accentTextTheme.bodySmall!.color!),
70
child: Text(
71
S.of(context).seed_language_next,
72
style: TextStyle(
77
- fontSize: 14,
78
- fontWeight: FontWeight.w600,
79
- color: Palette.blueCraiola),
73
+ fontSize: 14, fontWeight: FontWeight.w600, color: Palette.blueCraiola),
74
),
75
),
76
)
81
Widget body(BuildContext context) {
82
final image = currentTheme.type == ThemeType.dark ? imageDark : imageLight;
83
90
- return WillPopScope(onWillPop: () async => false, child: Container(
91
- padding: EdgeInsets.all(24),
92
- alignment: Alignment.center,
93
- child: ConstrainedBox(
94
- constraints:
95
- BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
96
- child: Column(
97
- children: <Widget>[
98
- Flexible(
99
- flex: 2,
100
- child: AspectRatio(
101
- aspectRatio: 1,
102
- child: FittedBox(child: image, fit: BoxFit.fill))),
103
- Flexible(
104
- flex: 3,
105
- child: Column(
106
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
84
+ return WillPopScope(
85
+ onWillPop: () async => false,
86
+ child: Container(
87
+ padding: EdgeInsets.all(24),
88
+ alignment: Alignment.center,
89
+ child: ConstrainedBox(
90
+ constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
91
+ child: Column(
92
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
93
+ children: <Widget>[
94
+ ConstrainedBox(
95
+ constraints:
96
+ BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.3),
97
+ child: AspectRatio(aspectRatio: 1, child: image),
98
+ ),
99
+ Observer(builder: (_) {
100
+ return Column(
101
+ crossAxisAlignment: CrossAxisAlignment.center,
102
children: <Widget>[
108
- Padding(
109
- padding: EdgeInsets.only(top: 33),
110
- child: Observer(builder: (_) {
111
- return Column(
112
- crossAxisAlignment: CrossAxisAlignment.center,
113
- children: <Widget>[
114
- Text(
115
- walletSeedViewModel.name,
116
- style: TextStyle(
117
- fontSize: 20,
118
- fontWeight: FontWeight.w600,
119
- color: Theme.of(context)
120
- .primaryTextTheme!
121
- .titleLarge!
122
- .color!),
123
- ),
124
- Padding(
125
- padding:
126
- EdgeInsets.only(top: 20, left: 16, right: 16),
127
- child: Text(
128
- walletSeedViewModel.seed,
129
- textAlign: TextAlign.center,
130
- style: TextStyle(
131
- fontSize: 14,
132
- fontWeight: FontWeight.normal,
133
- color: Theme.of(context)
134
- .primaryTextTheme!
135
- .bodySmall!
136
- .color!),
137
- ),
138
- )
139
- ],
140
- );
141
- }),
103
+ Text(
104
+ walletSeedViewModel.name,
105
+ style: TextStyle(
106
+ fontSize: 20,
107
+ fontWeight: FontWeight.w600,
108
+ color: Theme.of(context).primaryTextTheme.titleLarge!.color!),
109
),
143
- Column(
144
- children: <Widget>[
145
- isNewWalletCreated
146
- ? Padding(
147
- padding: EdgeInsets.only(
148
- bottom: 52, left: 43, right: 43),
149
- child: Text(
150
- S.of(context).seed_reminder,
151
- textAlign: TextAlign.center,
152
- style: TextStyle(
153
- fontSize: 12,
154
- fontWeight: FontWeight.normal,
155
- color: Theme.of(context)
156
- .primaryTextTheme!
157
- .labelSmall!
158
- .color!),
159
- ),
160
- )
161
- : Offstage(),
162
- Row(
163
- mainAxisSize: MainAxisSize.max,
164
- children: <Widget>[
165
- Flexible(
166
- child: Container(
167
- padding: EdgeInsets.only(right: 8.0),
168
- child: PrimaryButton(
169
- onPressed: () {
170
- ShareUtil.share(
171
- text: walletSeedViewModel.seed,
172
- context: context,
173
- );
174
- },
175
- text: S.of(context).save,
176
- color: Colors.green,
177
- textColor: Colors.white),
178
- )),
179
- Flexible(
180
- child: Container(
181
- padding: EdgeInsets.only(left: 8.0),
182
- child: Builder(
183
- builder: (context) => PrimaryButton(
184
- onPressed: () {
185
- Clipboard.setData(ClipboardData(
186
- text: walletSeedViewModel.seed));
187
- showBar<void>(context,
188
- S.of(context).copied_to_clipboard);
189
- },
190
- text: S.of(context).copy,
191
- color: Theme.of(context)
192
- .accentTextTheme!
193
- .bodyMedium!
194
- .color!,
195
- textColor: Colors.white)),
196
- ))
197
- ],
198
- )
199
- ],
110
+ Padding(
111
+ padding: EdgeInsets.only(top: 20, left: 16, right: 16),
112
+ child: Text(
113
+ walletSeedViewModel.seed,
114
+ textAlign: TextAlign.center,
115
+ style: TextStyle(
116
+ fontSize: 14,
117
+ fontWeight: FontWeight.normal,
118
+ color: Theme.of(context).primaryTextTheme.bodySmall!.color!),
119
+ ),
120
)
121
],
202
- ))
203
- ],
122
+ );
123
+ }),
124
+ Column(
125
+ children: <Widget>[
126
+ isNewWalletCreated
127
+ ? Padding(
128
+ padding: EdgeInsets.only(bottom: 43, left: 43, right: 43),
129
+ child: Text(
130
+ S.of(context).seed_reminder,
131
+ textAlign: TextAlign.center,
132
+ style: TextStyle(
133
+ fontSize: 12,
134
+ fontWeight: FontWeight.normal,
135
+ color: Theme.of(context).primaryTextTheme.labelSmall!.color!),
136
+ ),
137
+ )
138
+ : Offstage(),
139
+ Row(
140
+ mainAxisSize: MainAxisSize.max,
141
+ children: <Widget>[
142
+ Flexible(
143
+ child: Container(
144
+ padding: EdgeInsets.only(right: 8.0),
145
+ child: PrimaryButton(
146
+ onPressed: () {
147
+ ShareUtil.share(
148
+ text: walletSeedViewModel.seed,
149
+ context: context,
150
+ );
151
+ },
152
+ text: S.of(context).save,
153
+ color: Colors.green,
154
+ textColor: Colors.white),
155
+ )),
156
+ Flexible(
157
+ child: Container(
158
+ padding: EdgeInsets.only(left: 8.0),
159
+ child: Builder(
160
+ builder: (context) => PrimaryButton(
161
+ onPressed: () {
162
+ Clipboard.setData(
163
+ ClipboardData(text: walletSeedViewModel.seed));
164
+ showBar<void>(context, S.of(context).copied_to_clipboard);
165
+ },
166
+ text: S.of(context).copy,
167
+ color: Theme.of(context).accentTextTheme.bodyMedium!.color!,
168
+ textColor: Colors.white)),
169
+ ))
170
+ ],
171
+ )
172
+ ],
173
+ )
174
+ ],
175
+ ),
176
),
205
- )));
177
+ ));
178
}
179
}