clear field to minimum value

This commit is contained in:
sneurlax 2023-01-27 15:11:29 -06:00
parent 54d8e90c96
commit 7c0bfce3c2

View file

@ -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(),
) )