mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
clear field to minimum value
This commit is contained in:
parent
54d8e90c96
commit
7c0bfce3c2
1 changed files with 13 additions and 4 deletions
|
@ -1016,11 +1016,20 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
_buyAmountController.text.isNotEmpty
|
||||
? TextFieldIconButton(
|
||||
key: const Key(
|
||||
"buyViewClearAddressFieldButtonKey"),
|
||||
"buyViewClearAmountFieldButtonKey"),
|
||||
onTap: () {
|
||||
_buyAmountController.text = "";
|
||||
// _receiveAddress = "";
|
||||
setState(() {});
|
||||
if (_BuyFormState.buyWithFiat) {
|
||||
_buyAmountController.text = _BuyFormState
|
||||
.minFiat
|
||||
.toStringAsFixed(2);
|
||||
} else {
|
||||
if (selectedCrypto?.ticker ==
|
||||
_BuyFormState.boundedCryptoTicker) {
|
||||
_buyAmountController.text = _BuyFormState
|
||||
.minCrypto
|
||||
.toStringAsFixed(8);
|
||||
}
|
||||
}
|
||||
},
|
||||
child: const XIcon(),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue