5 Commits

Author SHA1 Message Date
af0242c44f Merge branch 'development' into refactoring/105-fehlende-umbenennungen
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m4s
Pull Request Pipeline / lint (pull_request) Successful in 2m7s
2025-12-31 16:25:19 +00:00
cd63f5cf06 Merge pull request 'Fehlende Info in CreateGroupView' (#107) from bug/73-Fehlende-Info-in-CreateGroupView into development
Reviewed-on: #107
Reviewed-by: Mathis Kirchner <mathis.kirchner.mk@gmail.com>
2025-12-31 16:24:31 +00:00
8c3282b954 Changed color to white
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 1m57s
Pull Request Pipeline / lint (pull_request) Successful in 4m58s
2025-12-31 17:10:47 +01:00
1c0fb9f3ab Merge branch 'development' into bug/73-Fehlende-Info-in-CreateGroupView
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m19s
Pull Request Pipeline / lint (pull_request) Successful in 2m21s
2025-12-31 16:41:26 +01:00
bfca41bd36 Fixed info message placement
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m19s
Pull Request Pipeline / lint (pull_request) Successful in 2m21s
2025-12-31 16:38:09 +01:00

View File

@@ -133,33 +133,42 @@ class _PlayerSelectionState extends State<PlayerSelection> {
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold), style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
Wrap( SizedBox(
alignment: WrapAlignment.start, height: 50,
crossAxisAlignment: WrapCrossAlignment.start, child: selectedPlayers.isEmpty
spacing: 8.0, ? const Center(child: Text('No players selected'))
runSpacing: 8.0, : SingleChildScrollView(
children: <Widget>[ scrollDirection: Axis.horizontal,
// Generates a TextIconTile for each selected player. child: Row(
for (var player in selectedPlayers) children: [
TextIconTile( for (var player in selectedPlayers)
text: player.name, Padding(
onIconTap: () { padding: const EdgeInsets.only(right: 8.0),
setState(() { child: TextIconTile(
// Removes the player from the selection and notifies the parent. text: player.name,
final currentSearch = _searchBarController.text onIconTap: () {
.toLowerCase(); setState(() {
selectedPlayers.remove(player); // Removes the player from the selection and notifies the parent.
widget.onChanged([...selectedPlayers]); final currentSearch = _searchBarController
// If the player matches the current search query (or search is empty), .text
// they are added back to the suggestions and the list is re-sorted. .toLowerCase();
if (currentSearch.isEmpty || selectedPlayers.remove(player);
player.name.toLowerCase().contains(currentSearch)) { widget.onChanged([...selectedPlayers]);
suggestedPlayers.add(player); // 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 SizedBox(height: 10),
const Text( const Text(