From dea8f872d547f860d92aba49aec956f5c8b7cf96 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Fri, 9 Oct 2020 23:19:12 +0300 Subject: [PATCH] CAKE-116 | merged new world branch into current --- lib/src/screens/send/send_page.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 811d940dd..459e435d5 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -163,14 +163,14 @@ class SendPage extends BasePage { .decorationColor), validator: sendViewModel.addressValidator, ), - Padding( + Observer(builder: (_) => Padding( padding: const EdgeInsets.only(top: 20), child: BaseTextFormField( focusNode: _cryptoAmountFocus, controller: _cryptoAmountController, keyboardType: - TextInputType.numberWithOptions( - signed: false, decimal: true), + TextInputType.numberWithOptions( + signed: false, decimal: true), prefixIcon: Padding( padding: EdgeInsets.only(top: 9), child: Text( @@ -226,7 +226,9 @@ class SendPage extends BasePage { fontWeight: FontWeight.w500, fontSize: 14), validator: - sendViewModel.amountValidator)), + sendViewModel.sendAll + ? sendViewModel.allAmountValidator + : sendViewModel.amountValidator))), Observer( builder: (_) => Padding( padding: EdgeInsets.only(top: 10), @@ -513,6 +515,7 @@ class SendPage extends BasePage { final amount = _fiatAmountController.text; if (amount != sendViewModel.fiatAmount) { + sendViewModel.sendAll = false; sendViewModel.setFiatAmount(amount); } });