mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 02:24:30 +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) {
|
||||
_sendController.text = ref.read(efSendAmountStringProvider);
|
||||
// }
|
||||
|
||||
if (_sendFocusNode.hasFocus) {
|
||||
_sendController.selection = TextSelection.fromPosition(
|
||||
TextPosition(
|
||||
offset: _sendController.text.length,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
ref.listen(efSendAmountStringProvider, (previous, String next) {
|
||||
|
@ -810,6 +818,14 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
? "-"
|
||||
: ref.read(efReceiveAmountStringProvider);
|
||||
// }
|
||||
|
||||
if (_receiveFocusNode.hasFocus) {
|
||||
_receiveController.selection = TextSelection.fromPosition(
|
||||
TextPosition(
|
||||
offset: _receiveController.text.length,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue