From bfca41bd36af578a80e34f9b84c3cc7856972c63 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Wed, 31 Dec 2025 16:38:09 +0100 Subject: [PATCH 1/2] Fixed info message placement --- .../widgets/player_selection.dart | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/lib/presentation/widgets/player_selection.dart b/lib/presentation/widgets/player_selection.dart index e2114b2..88841e6 100644 --- a/lib/presentation/widgets/player_selection.dart +++ b/lib/presentation/widgets/player_selection.dart @@ -128,33 +128,47 @@ class _PlayerSelectionState extends State { style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold), ), const SizedBox(height: 10), - Wrap( - alignment: WrapAlignment.start, - crossAxisAlignment: WrapCrossAlignment.start, - spacing: 8.0, - runSpacing: 8.0, - children: [ - // Generates a TextIconTile for each selected player. - for (var player in selectedPlayers) - TextIconTile( - text: player.name, - onIconTap: () { - setState(() { - // Removes the player from the selection and notifies the parent. - final currentSearch = _searchBarController.text - .toLowerCase(); - selectedPlayers.remove(player); - widget.onChanged([...selectedPlayers]); - // If the player matches the current search query (or search is empty), - // they are added back to the suggestions and the list is re-sorted. - if (currentSearch.isEmpty || - player.name.toLowerCase().contains(currentSearch)) { - suggestedPlayers.add(player); - } - }); - }, - ), - ], + SizedBox( + height: 50, + child: selectedPlayers.isEmpty + ? const Center( + child: Text( + 'No players selected', + style: TextStyle(color: Colors.grey), + ), + ) + : SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + for (var player in selectedPlayers) + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: TextIconTile( + text: player.name, + onIconTap: () { + setState(() { + // Removes the player from the selection and notifies the parent. + final currentSearch = _searchBarController + .text + .toLowerCase(); + selectedPlayers.remove(player); + widget.onChanged([...selectedPlayers]); + // If the player matches the current search query (or search is empty), + // they are added back to the suggestions and the list is re-sorted. + if (currentSearch.isEmpty || + player.name.toLowerCase().contains( + currentSearch, + )) { + suggestedPlayers.add(player); + } + }); + }, + ), + ), + ], + ), + ), ), const SizedBox(height: 10), const Text( From 8c3282b954642f823a8e7f063d5a7ef9b5ceb977 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Wed, 31 Dec 2025 17:10:47 +0100 Subject: [PATCH 2/2] Changed color to white --- lib/presentation/widgets/player_selection.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/presentation/widgets/player_selection.dart b/lib/presentation/widgets/player_selection.dart index 007a95f..eb70ae0 100644 --- a/lib/presentation/widgets/player_selection.dart +++ b/lib/presentation/widgets/player_selection.dart @@ -136,12 +136,7 @@ class _PlayerSelectionState extends State { SizedBox( height: 50, child: selectedPlayers.isEmpty - ? const Center( - child: Text( - 'No players selected', - style: TextStyle(color: Colors.grey), - ), - ) + ? const Center(child: Text('No players selected')) : SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row(