remove futurebuilder from player selection and refactor

This commit is contained in:
2025-12-23 22:59:01 +01:00
parent 9ad5c4ad6f
commit 06a9c0cd84

View File

@@ -54,7 +54,6 @@ class _PlayerSelectionState extends State<PlayerSelection> {
Future.delayed(minimumSkeletonDuration),
]).then((results) => results[0] as List<Player>);
_allPlayersFuture.then((loadedPlayers) {
isLoading = false;
setState(() {
// If a list of available players is provided, use that list.
if (widget.availablePlayers.isNotEmpty) {
@@ -79,6 +78,7 @@ class _PlayerSelectionState extends State<PlayerSelection> {
suggestedPlayers = [...loadedPlayers];
}
});
isLoading = false;
});
}