4 Commits

Author SHA1 Message Date
1e730cebe6 wrap isLoading into mounted and setState
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m8s
Pull Request Pipeline / lint (pull_request) Successful in 2m9s
2025-12-24 13:01:40 +01:00
7eb25221d7 add mounted check before calling setState in match_view 2025-12-24 13:01:16 +01:00
f9722bc762 wrap isLoading = false in a mounted check and setState call 2025-12-24 13:01:05 +01:00
f2917a6813 removed empty line 2025-12-24 13:00:38 +01:00
4 changed files with 15 additions and 6 deletions

View File

@@ -105,7 +105,11 @@ class _GroupsViewState extends State<GroupsView> {
groups = loadedGroups
..sort((a, b) => b.createdAt.compareTo(a.createdAt));
});
isLoading = false;
if (mounted) {
setState(() {
isLoading = false;
});
}
});
}
}

View File

@@ -108,7 +108,6 @@ class _CreateMatchViewState extends State<CreateMatchView> {
groupsList = result[0] as List<Group>;
playerList = result[1] as List<Player>;
});
filteredPlayerList = List.from(playerList);
}

View File

@@ -122,9 +122,11 @@ class _MatchViewState extends State<MatchView> {
final loadedMatches = results[0] as List<Match>;
matches = loadedMatches
..sort((a, b) => b.createdAt.compareTo(a.createdAt));
setState(() {
isLoading = false;
});
if (mounted) {
setState(() {
isLoading = false;
});
}
});
}
}

View File

@@ -78,7 +78,11 @@ class _PlayerSelectionState extends State<PlayerSelection> {
suggestedPlayers = [...loadedPlayers];
}
});
isLoading = false;
if (mounted) {
setState(() {
isLoading = false;
});
}
});
}