Set the curson position at the end of the value in the textfield.
RafiaChy committed
Jan 21, 2022 at 17:58 UTC
f2ec887b3a36d413dc1caa03e9e38e6ba6650cab
2 files changed
+11
-2
lib/src/screens/new_wallet/new_wallet_page.dart
+5
-1
@@ -122,9 +122,13 @@ class _WalletNameFormState extends State<WalletNameForm> {
122
setState(() {
123
_controller.text = rName;
124
_walletNewVM.name = rName;
125
+ _controller.selection = TextSelection.fromPosition(
126
+ TextPosition(offset: _controller.text.length));
127
});
128
},
127
- icon: Icon(Icons.refresh),
129
+ icon: Image.asset(
130
+ 'assets/images/refresh_icon.png',
131
+ ),
132
),
133
hintStyle: TextStyle(
134
fontSize: 18.0,
lib/src/screens/restore/wallet_restore_from_seed_form.dart
+6
-1
@@ -68,9 +68,14 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
68
print(rName);
69
setState(() {
70
nameTextEditingController.text = rName;
71
+ nameTextEditingController.selection =
72
+ TextSelection.fromPosition(TextPosition(
73
+ offset: nameTextEditingController.text.length));
74
});
75
},
73
- icon: Icon(Icons.refresh),
76
+ icon: Image.asset(
77
+ 'assets/images/refresh_icon.png',
78
+ ),
79
),
80
),
81
Container(height: 20),