mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
ensure cursor stays at end on exchange/swap form
This commit is contained in:
parent
d867270aac
commit
f2a872c44c
1 changed files with 16 additions and 0 deletions
|
@ -799,6 +799,14 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
// if (_swapLock) {
|
// if (_swapLock) {
|
||||||
_sendController.text = ref.read(efSendAmountStringProvider);
|
_sendController.text = ref.read(efSendAmountStringProvider);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
if (_sendFocusNode.hasFocus) {
|
||||||
|
_sendController.selection = TextSelection.fromPosition(
|
||||||
|
TextPosition(
|
||||||
|
offset: _sendController.text.length,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ref.listen(efSendAmountStringProvider, (previous, String next) {
|
ref.listen(efSendAmountStringProvider, (previous, String next) {
|
||||||
|
@ -810,6 +818,14 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
? "-"
|
? "-"
|
||||||
: ref.read(efReceiveAmountStringProvider);
|
: ref.read(efReceiveAmountStringProvider);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
if (_receiveFocusNode.hasFocus) {
|
||||||
|
_receiveController.selection = TextSelection.fromPosition(
|
||||||
|
TextPosition(
|
||||||
|
offset: _receiveController.text.length,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue