CAKE-38 | changed button position in alerts (contact list page, wallet menu, base exchange widget, nodes list page, base send widget, change language page)

OleksandrSobol committed Sep 8, 2020 at 20:21 UTC 49c495f688eef071edd16383a0a0e6a70ed1d2f7
8 files changed +35 -57
lib/src/screens/contact/contact_list_page.dart
+8 -8
@@ -252,10 +252,10 @@ class ContactListPage extends BasePage {
252 return AlertWithTwoActions(
253 alertTitle: S.of(context).address_remove_contact,
254 alertContent: S.of(context).address_remove_content,
255 - leftButtonText: S.of(context).remove,
256 - rightButtonText: S.of(context).cancel,
257 - actionLeftButton: () => Navigator.of(context).pop(true),
258 - actionRightButton: () => Navigator.of(context).pop(false));
255 + rightButtonText: S.of(context).remove,
256 + leftButtonText: S.of(context).cancel,
257 + actionRightButton: () => Navigator.of(context).pop(true),
258 + actionLeftButton: () => Navigator.of(context).pop(false));
259 });
260 }
261
@@ -267,10 +267,10 @@ class ContactListPage extends BasePage {
267 return AlertWithTwoActions(
268 alertTitle: name,
269 alertContent: address,
270 - leftButtonText: S.of(context).copy,
271 - rightButtonText: S.of(context).cancel,
272 - actionLeftButton: () => Navigator.of(context).pop(true),
273 - actionRightButton: () => Navigator.of(context).pop(false));
270 + rightButtonText: S.of(context).copy,
271 + leftButtonText: S.of(context).cancel,
272 + actionRightButton: () => Navigator.of(context).pop(true),
273 + actionLeftButton: () => Navigator.of(context).pop(false));
274 });
275 }
276 }
lib/src/screens/dashboard/wallet_menu.dart
+4 -4
@@ -78,13 +78,13 @@ class WalletMenu {
78 return AlertWithTwoActions(
79 alertTitle: S.of(context).reconnection,
80 alertContent: S.of(context).reconnect_alert_text,
81 - leftButtonText: S.of(context).ok,
82 - rightButtonText: S.of(context).cancel,
83 - actionLeftButton: () {
81 + rightButtonText: S.of(context).ok,
82 + leftButtonText: S.of(context).cancel,
83 + actionRightButton: () {
84 walletStore.reconnect();
85 Navigator.of(context).pop();
86 },
87 - actionRightButton: () => Navigator.of(context).pop()
87 + actionLeftButton: () => Navigator.of(context).pop()
88 );
89 });
90 }
lib/src/screens/exchange/widgets/base_exchange_widget.dart
+4 -4
@@ -284,14 +284,14 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
284 return AlertWithTwoActions(
285 alertTitle: S.of(context).template,
286 alertContent: S.of(context).confirm_delete_template,
287 - leftButtonText: S.of(context).delete,
288 - rightButtonText: S.of(context).cancel,
289 - actionLeftButton: () {
287 + rightButtonText: S.of(context).delete,
288 + leftButtonText: S.of(context).cancel,
289 + actionRightButton: () {
290 Navigator.of(dialogContext).pop();
291 exchangeViewModel.exchangeTemplateStore.remove(template: template);
292 exchangeViewModel.exchangeTemplateStore.update();
293 },
294 - actionRightButton: () => Navigator.of(dialogContext).pop()
294 + actionLeftButton: () => Navigator.of(dialogContext).pop()
295 );
296 }
297 );
lib/src/screens/nodes/nodes_list_page.dart
+8 -8
@@ -36,13 +36,13 @@ class NodeListPage extends BasePage {
36 alertTitle: S.of(context).node_reset_settings_title,
37 alertContent:
38 S.of(context).nodes_list_reset_to_default_message,
39 - leftButtonText: S.of(context).reset,
40 - rightButtonText: S.of(context).cancel,
41 - actionLeftButton: () async {
39 + rightButtonText: S.of(context).reset,
40 + leftButtonText: S.of(context).cancel,
41 + actionRightButton: () async {
42 Navigator.of(context).pop();
43 await nodeListViewModel.reset();
44 },
45 - actionRightButton: () => Navigator.of(context).pop());
45 + actionLeftButton: () => Navigator.of(context).pop());
46 });
47 },
48 child: Text(
@@ -90,11 +90,11 @@ class NodeListPage extends BasePage {
90 return AlertWithTwoActions(
91 alertTitle: S.of(context).remove_node,
92 alertContent: S.of(context).remove_node_message,
93 - leftButtonText: S.of(context).remove,
94 - rightButtonText: S.of(context).cancel,
95 - actionLeftButton: () =>
96 - Navigator.pop(context, true),
93 + rightButtonText: S.of(context).remove,
94 + leftButtonText: S.of(context).cancel,
95 actionRightButton: () =>
96 + Navigator.pop(context, true),
97 + actionLeftButton: () =>
98 Navigator.pop(context, false));
99 });
100 },
lib/src/screens/send/widgets/base_send_widget.dart
+4 -4
@@ -387,14 +387,14 @@ class BaseSendWidget extends StatelessWidget {
387 return AlertWithTwoActions(
388 alertTitle: S.of(context).template,
389 alertContent: S.of(context).confirm_delete_template,
390 - leftButtonText: S.of(context).delete,
391 - rightButtonText: S.of(context).cancel,
392 - actionLeftButton: () {
390 + rightButtonText: S.of(context).delete,
391 + leftButtonText: S.of(context).cancel,
392 + actionRightButton: () {
393 Navigator.of(dialogContext).pop();
394 sendViewModel.sendTemplateStore.remove(template: template);
395 sendViewModel.sendTemplateStore.update();
396 },
397 - actionRightButton: () => Navigator.of(dialogContext).pop()
397 + actionLeftButton: () => Navigator.of(dialogContext).pop()
398 );
399 }
400 );
lib/src/screens/settings/change_language.dart
+4 -4
@@ -43,15 +43,15 @@ class ChangeLanguage extends BasePage {
43 return AlertWithTwoActions(
44 alertTitle: S.of(context).change_language,
45 alertContent: S.of(context).change_language_to(item),
46 - leftButtonText: S.of(context).change,
47 - rightButtonText: S.of(context).cancel,
48 - actionLeftButton: () {
46 + rightButtonText: S.of(context).change,
47 + leftButtonText: S.of(context).cancel,
48 + actionRightButton: () {
49 settingsStore.saveLanguageCode(
50 languageCode: code);
51 currentLanguage.setCurrentLanguage(code);
52 Navigator.of(context).pop();
53 },
54 - actionRightButton: () => Navigator.of(context).pop()
54 + actionLeftButton: () => Navigator.of(context).pop()
55 );
56 });
57 }
lib/src/widgets/base_alert_dialog.dart
+3 -3
@@ -47,7 +47,7 @@ class BaseAlertDialog extends StatelessWidget {
47 child: Container(
48 height: 52,
49 padding: EdgeInsets.only(left: 6, right: 6),
50 - color: Palette.blueCraiola,
50 + color: Palette.alizarinRed,
51 child: ButtonTheme(
52 minWidth: double.infinity,
53 child: FlatButton(
@@ -72,7 +72,7 @@ class BaseAlertDialog extends StatelessWidget {
72 child: Container(
73 height: 52,
74 padding: EdgeInsets.only(left: 6, right: 6),
75 - color: Palette.alizarinRed,
75 + color: Palette.blueCraiola,
76 child: ButtonTheme(
77 minWidth: double.infinity,
78 child: FlatButton(
@@ -92,7 +92,7 @@ class BaseAlertDialog extends StatelessWidget {
92 )),
93 ),
94 )
95 - )
95 + ),
96 ],
97 );
98 }
lib/themes.dart
-22
@@ -168,16 +168,6 @@ class Themes {
168 decorationColor: Palette.darkGray // switch (PIN code)
169 )
170 ),
171 -
172 -
173 -
174 - cardColor: Palette.blueAlice,
175 - cardTheme: CardTheme(
176 - color: Colors.white, // synced card start
177 - ),
178 -
179 -
180 -
171 );
172
173
@@ -346,17 +336,5 @@ class Themes {
336 decorationColor: PaletteDark.lightPurpleBlue // switch (PIN code)
337 )
338 ),
349 -
350 -
351 -
352 - cardColor: PaletteDark.darkNightBlue,
353 - cardTheme: CardTheme(
354 - color: PaletteDark.moderateBlue, // synced card start
355 - ),
356 -
357 -
358 -
359 -
339 );
361 -
340 }
\ No newline at end of file