diff --git a/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_dialog.dart b/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_dialog.dart index 0f2b0c4c2..7d1525a47 100644 --- a/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_dialog.dart +++ b/lib/routes/home/widgets/bottom_actions_bar/enter_payment_info_dialog.dart @@ -141,45 +141,49 @@ class EnterPaymentInfoDialogState extends State { final texts = context.texts(); List actions = [ - SimpleDialogOption( - onPressed: () => Navigator.pop(context), - child: Text( - texts.payment_info_dialog_action_cancel, - style: themeData.primaryTextTheme.labelLarge, - ), - ) + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SimpleDialogOption( + padding: const EdgeInsets.symmetric(), + onPressed: () => Navigator.pop(context), + child: Text( + texts.payment_info_dialog_action_cancel, + style: themeData.primaryTextTheme.labelLarge, + ), + ), + if (_paymentInfoController.text.isNotEmpty) ...[ + SimpleDialogOption( + onPressed: (() async { + final inputBloc = context.read(); + final navigator = Navigator.of(context); + _setLoading(true); + + try { + await _validateInput(_paymentInfoController.text); + if (_formKey.currentState!.validate()) { + _setLoading(false); + navigator.pop(); + inputBloc.addIncomingInput(_paymentInfoController.text); + } + } catch (error) { + _setLoading(false); + _log.w(error.toString(), ex: error); + _setValidatorErrorMessage(texts.payment_info_dialog_error); + } finally { + _setLoading(false); + } + }), + child: Text( + texts.payment_info_dialog_action_approve, + style: themeData.primaryTextTheme.labelLarge, + ), + ) + ], + ], + ), ]; - if (_paymentInfoController.text.isNotEmpty) { - actions.add( - SimpleDialogOption( - onPressed: (() async { - final inputBloc = context.read(); - final navigator = Navigator.of(context); - _setLoading(true); - - try { - await _validateInput(_paymentInfoController.text); - if (_formKey.currentState!.validate()) { - _setLoading(false); - navigator.pop(); - inputBloc.addIncomingInput(_paymentInfoController.text); - } - } catch (error) { - _setLoading(false); - _log.w(error.toString(), ex: error); - _setValidatorErrorMessage(texts.payment_info_dialog_error); - } finally { - _setLoading(false); - } - }), - child: Text( - texts.payment_info_dialog_action_approve, - style: themeData.primaryTextTheme.labelLarge, - ), - ), - ); - } return actions; }