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

This commit is contained in:
OleksandrSobol 2020-09-08 20:21:09 +03:00
parent 7fe738031f
commit 49c495f688
8 changed files with 35 additions and 57 deletions

View file

@ -252,10 +252,10 @@ class ContactListPage extends BasePage {
return AlertWithTwoActions(
alertTitle: S.of(context).address_remove_contact,
alertContent: S.of(context).address_remove_content,
leftButtonText: S.of(context).remove,
rightButtonText: S.of(context).cancel,
actionLeftButton: () => Navigator.of(context).pop(true),
actionRightButton: () => Navigator.of(context).pop(false));
rightButtonText: S.of(context).remove,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
});
}
@ -267,10 +267,10 @@ class ContactListPage extends BasePage {
return AlertWithTwoActions(
alertTitle: name,
alertContent: address,
leftButtonText: S.of(context).copy,
rightButtonText: S.of(context).cancel,
actionLeftButton: () => Navigator.of(context).pop(true),
actionRightButton: () => Navigator.of(context).pop(false));
rightButtonText: S.of(context).copy,
leftButtonText: S.of(context).cancel,
actionRightButton: () => Navigator.of(context).pop(true),
actionLeftButton: () => Navigator.of(context).pop(false));
});
}
}

View file

@ -78,13 +78,13 @@ class WalletMenu {
return AlertWithTwoActions(
alertTitle: S.of(context).reconnection,
alertContent: S.of(context).reconnect_alert_text,
leftButtonText: S.of(context).ok,
rightButtonText: S.of(context).cancel,
actionLeftButton: () {
rightButtonText: S.of(context).ok,
leftButtonText: S.of(context).cancel,
actionRightButton: () {
walletStore.reconnect();
Navigator.of(context).pop();
},
actionRightButton: () => Navigator.of(context).pop()
actionLeftButton: () => Navigator.of(context).pop()
);
});
}

View file

@ -284,14 +284,14 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
return AlertWithTwoActions(
alertTitle: S.of(context).template,
alertContent: S.of(context).confirm_delete_template,
leftButtonText: S.of(context).delete,
rightButtonText: S.of(context).cancel,
actionLeftButton: () {
rightButtonText: S.of(context).delete,
leftButtonText: S.of(context).cancel,
actionRightButton: () {
Navigator.of(dialogContext).pop();
exchangeViewModel.exchangeTemplateStore.remove(template: template);
exchangeViewModel.exchangeTemplateStore.update();
},
actionRightButton: () => Navigator.of(dialogContext).pop()
actionLeftButton: () => Navigator.of(dialogContext).pop()
);
}
);

View file

@ -36,13 +36,13 @@ class NodeListPage extends BasePage {
alertTitle: S.of(context).node_reset_settings_title,
alertContent:
S.of(context).nodes_list_reset_to_default_message,
leftButtonText: S.of(context).reset,
rightButtonText: S.of(context).cancel,
actionLeftButton: () async {
rightButtonText: S.of(context).reset,
leftButtonText: S.of(context).cancel,
actionRightButton: () async {
Navigator.of(context).pop();
await nodeListViewModel.reset();
},
actionRightButton: () => Navigator.of(context).pop());
actionLeftButton: () => Navigator.of(context).pop());
});
},
child: Text(
@ -90,11 +90,11 @@ class NodeListPage extends BasePage {
return AlertWithTwoActions(
alertTitle: S.of(context).remove_node,
alertContent: S.of(context).remove_node_message,
leftButtonText: S.of(context).remove,
rightButtonText: S.of(context).cancel,
actionLeftButton: () =>
Navigator.pop(context, true),
rightButtonText: S.of(context).remove,
leftButtonText: S.of(context).cancel,
actionRightButton: () =>
Navigator.pop(context, true),
actionLeftButton: () =>
Navigator.pop(context, false));
});
},

View file

@ -387,14 +387,14 @@ class BaseSendWidget extends StatelessWidget {
return AlertWithTwoActions(
alertTitle: S.of(context).template,
alertContent: S.of(context).confirm_delete_template,
leftButtonText: S.of(context).delete,
rightButtonText: S.of(context).cancel,
actionLeftButton: () {
rightButtonText: S.of(context).delete,
leftButtonText: S.of(context).cancel,
actionRightButton: () {
Navigator.of(dialogContext).pop();
sendViewModel.sendTemplateStore.remove(template: template);
sendViewModel.sendTemplateStore.update();
},
actionRightButton: () => Navigator.of(dialogContext).pop()
actionLeftButton: () => Navigator.of(dialogContext).pop()
);
}
);

View file

@ -43,15 +43,15 @@ class ChangeLanguage extends BasePage {
return AlertWithTwoActions(
alertTitle: S.of(context).change_language,
alertContent: S.of(context).change_language_to(item),
leftButtonText: S.of(context).change,
rightButtonText: S.of(context).cancel,
actionLeftButton: () {
rightButtonText: S.of(context).change,
leftButtonText: S.of(context).cancel,
actionRightButton: () {
settingsStore.saveLanguageCode(
languageCode: code);
currentLanguage.setCurrentLanguage(code);
Navigator.of(context).pop();
},
actionRightButton: () => Navigator.of(context).pop()
actionLeftButton: () => Navigator.of(context).pop()
);
});
}

View file

@ -47,7 +47,7 @@ class BaseAlertDialog extends StatelessWidget {
child: Container(
height: 52,
padding: EdgeInsets.only(left: 6, right: 6),
color: Palette.blueCraiola,
color: Palette.alizarinRed,
child: ButtonTheme(
minWidth: double.infinity,
child: FlatButton(
@ -72,7 +72,7 @@ class BaseAlertDialog extends StatelessWidget {
child: Container(
height: 52,
padding: EdgeInsets.only(left: 6, right: 6),
color: Palette.alizarinRed,
color: Palette.blueCraiola,
child: ButtonTheme(
minWidth: double.infinity,
child: FlatButton(
@ -92,7 +92,7 @@ class BaseAlertDialog extends StatelessWidget {
)),
),
)
)
),
],
);
}

View file

@ -168,16 +168,6 @@ class Themes {
decorationColor: Palette.darkGray // switch (PIN code)
)
),
cardColor: Palette.blueAlice,
cardTheme: CardTheme(
color: Colors.white, // synced card start
),
);
@ -346,17 +336,5 @@ class Themes {
decorationColor: PaletteDark.lightPurpleBlue // switch (PIN code)
)
),
cardColor: PaletteDark.darkNightBlue,
cardTheme: CardTheme(
color: PaletteDark.moderateBlue, // synced card start
),
);
}