hide keyboard on coin control select coins press

This commit is contained in:
julian 2023-03-09 12:30:16 -06:00
parent 645ec5c2a0
commit 827b746f68

View file

@ -1621,6 +1621,14 @@ class _SendViewState extends ConsumerState<SendView> {
? "Select coins" ? "Select coins"
: "Selected coins (${selectedUTXOs.length})", : "Selected coins (${selectedUTXOs.length})",
onTap: () async { onTap: () async {
if (FocusScope.of(context).hasFocus) {
FocusScope.of(context).unfocus();
await Future<void>.delayed(
const Duration(milliseconds: 100),
);
}
if (mounted) {
final spendable = ref final spendable = ref
.read(walletsChangeNotifierProvider) .read(walletsChangeNotifierProvider)
.getManager(widget.walletId) .getManager(widget.walletId)
@ -1629,7 +1637,8 @@ class _SendViewState extends ConsumerState<SendView> {
int? amount; int? amount;
if (_amountToSend != null) { if (_amountToSend != null) {
amount = Format.decimalAmountToSatoshis( amount =
Format.decimalAmountToSatoshis(
_amountToSend!, _amountToSend!,
coin, coin,
); );
@ -1642,7 +1651,8 @@ class _SendViewState extends ConsumerState<SendView> {
} }
final result = final result =
await Navigator.of(context).pushNamed( await Navigator.of(context)
.pushNamed(
CoinControlView.routeName, CoinControlView.routeName,
arguments: Tuple4( arguments: Tuple4(
walletId, walletId,
@ -1657,6 +1667,7 @@ class _SendViewState extends ConsumerState<SendView> {
selectedUTXOs = result; selectedUTXOs = result;
}); });
} }
}
}, },
), ),
], ],