mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
hide keyboard on coin control select coins press
This commit is contained in:
parent
645ec5c2a0
commit
827b746f68
1 changed files with 42 additions and 31 deletions
|
@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue