Set the curson position at the end of the value in the textfield.

This commit is contained in:
RafiaChy 2022-01-21 17:58:09 +06:00
parent 2b7d798253
commit f2ec887b3a
2 changed files with 11 additions and 2 deletions

View file

@ -122,9 +122,13 @@ class _WalletNameFormState extends State<WalletNameForm> {
setState(() {
_controller.text = rName;
_walletNewVM.name = rName;
_controller.selection = TextSelection.fromPosition(
TextPosition(offset: _controller.text.length));
});
},
icon: Icon(Icons.refresh),
icon: Image.asset(
'assets/images/refresh_icon.png',
),
),
hintStyle: TextStyle(
fontSize: 18.0,

View file

@ -68,9 +68,14 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
print(rName);
setState(() {
nameTextEditingController.text = rName;
nameTextEditingController.selection =
TextSelection.fromPosition(TextPosition(
offset: nameTextEditingController.text.length));
});
},
icon: Icon(Icons.refresh),
icon: Image.asset(
'assets/images/refresh_icon.png',
),
),
),
Container(height: 20),