Updated game title textfield with focus node and textaction

This commit is contained in:
2025-07-21 12:04:46 +02:00
parent 8aa90215cf
commit 472e6156ac
2 changed files with 9 additions and 1 deletions

View File

@@ -104,6 +104,14 @@ class _CreateGameViewState extends State<CreateGameView> {
textAlign: TextAlign.right,
placeholder: AppLocalizations.of(context).game_title,
controller: _gameTitleTextController,
onSubmitted: (_) {
_playerNameFocusNodes.isNotEmpty
? _playerNameFocusNodes[0].requestFocus()
: FocusScope.of(context).unfocus();
},
textInputAction: _playerNameFocusNodes.isNotEmpty
? TextInputAction.next
: TextInputAction.done,
),
),
Padding(