2 Commits

Author SHA1 Message Date
87856e6548 Simplified info texts
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m8s
Pull Request Pipeline / lint (pull_request) Successful in 2m8s
2026-01-02 18:41:39 +01:00
cb7804cf55 Fixed Problem with widget state 2026-01-02 18:38:13 +01:00
2 changed files with 8 additions and 10 deletions

View File

@@ -110,8 +110,10 @@ class _CreateMatchViewState extends State<CreateMatchView> {
]).then((result) async { ]).then((result) async {
groupsList = result[0] as List<Group>; groupsList = result[0] as List<Group>;
playerList = result[1] as List<Player>; playerList = result[1] as List<Player>;
}); setState(() {
filteredPlayerList = List.from(playerList); filteredPlayerList = List.from(playerList);
});
});
} }
@override @override

View File

@@ -182,9 +182,6 @@ class _PlayerSelectionState extends State<PlayerSelection> {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
/*
*/
Expanded( Expanded(
child: AppSkeleton( child: AppSkeleton(
enabled: isLoading, enabled: isLoading,
@@ -273,14 +270,13 @@ class _PlayerSelectionState extends State<PlayerSelection> {
/// Determines the appropriate info text to display when no players /// Determines the appropriate info text to display when no players
/// are available in the suggested players list. /// are available in the suggested players list.
String _getInfoText() { String _getInfoText() {
if (widget.availablePlayers != null && widget.availablePlayers!.isEmpty) { if (allPlayers.isEmpty) {
// Available players list is provided but empty
return 'All players added to the match';
} else if (allPlayers.isEmpty) {
// No players exist in the database // No players exist in the database
return 'No players created yet'; return 'No players created yet';
} else if (selectedPlayers.length == allPlayers.length) { } else if (selectedPlayers.length == allPlayers.length ||
// All players have been selected widget.availablePlayers?.isEmpty == true) {
// All players have been selected or
// available players list is provided but empty
return 'No more players to add'; return 'No more players to add';
} else { } else {
// No players match the search query // No players match the search query