mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +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
|
_buyAmountController.text.isNotEmpty
|
||||||
? TextFieldIconButton(
|
? TextFieldIconButton(
|
||||||
key: const Key(
|
key: const Key(
|
||||||
"buyViewClearAddressFieldButtonKey"),
|
"buyViewClearAmountFieldButtonKey"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_buyAmountController.text = "";
|
if (_BuyFormState.buyWithFiat) {
|
||||||
// _receiveAddress = "";
|
_buyAmountController.text = _BuyFormState
|
||||||
setState(() {});
|
.minFiat
|
||||||
|
.toStringAsFixed(2);
|
||||||
|
} else {
|
||||||
|
if (selectedCrypto?.ticker ==
|
||||||
|
_BuyFormState.boundedCryptoTicker) {
|
||||||
|
_buyAmountController.text = _BuyFormState
|
||||||
|
.minCrypto
|
||||||
|
.toStringAsFixed(8);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: const XIcon(),
|
child: const XIcon(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue