mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
CAKE-135 | removed validation alert in the send and exchange pages when clear/reset buttons was pushed (applied _formKey.currentState.reset())
This commit is contained in:
parent
e7574c51f6
commit
18e2df4f40
3 changed files with 9 additions and 2 deletions
|
@ -61,7 +61,10 @@ class ExchangePage extends BasePage {
|
|||
|
||||
@override
|
||||
Widget trailing(BuildContext context) => TrailButton(
|
||||
caption: S.of(context).reset, onPressed: () => exchangeViewModel.reset());
|
||||
caption: S.of(context).reset, onPressed: () {
|
||||
_formKey.currentState.reset();
|
||||
exchangeViewModel.reset();
|
||||
});
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
|
|
|
@ -70,7 +70,10 @@ class SendPage extends BasePage {
|
|||
|
||||
@override
|
||||
Widget trailing(context) => TrailButton(
|
||||
caption: S.of(context).clear, onPressed: () => sendViewModel.reset());
|
||||
caption: S.of(context).clear, onPressed: () {
|
||||
_formKey.currentState.reset();
|
||||
sendViewModel.reset();
|
||||
});
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
|
|
|
@ -107,6 +107,7 @@ abstract class SendViewModelBase with Store {
|
|||
|
||||
@action
|
||||
void reset() {
|
||||
sendAll = false;
|
||||
cryptoAmount = '';
|
||||
fiatAmount = '';
|
||||
address = '';
|
||||
|
|
Loading…
Reference in a new issue