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