From 472e6156ac1aecb91ca25dafb52d4172ff4f2485 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Mon, 21 Jul 2025 12:04:46 +0200 Subject: [PATCH] Updated game title textfield with focus node and textaction --- lib/presentation/views/create_game_view.dart | 8 ++++++++ pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/presentation/views/create_game_view.dart b/lib/presentation/views/create_game_view.dart index 201ce9d..a5fe6ef 100644 --- a/lib/presentation/views/create_game_view.dart +++ b/lib/presentation/views/create_game_view.dart @@ -104,6 +104,14 @@ class _CreateGameViewState extends State { 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( diff --git a/pubspec.yaml b/pubspec.yaml index 04d9ee1..8964db2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game Cabo" publish_to: 'none' -version: 0.5.3+587 +version: 0.5.3+588 environment: sdk: ^3.5.4