LeaderboardScreen called loadAll() which uses Future.wait across 4 APIs. If getDashboard() fails (empty user_id before auth), the entire batch throws and leaderboard stays []. Switching districts worked because setDistrict() calls getLeaderboard() directly. - Add loadLeaderboard() to GamificationProvider — calls only getLeaderboard(), independent of dashboard/shop/achievements - Add isLeaderboardLoading field with correct lifecycle in setDistrict/setTimePeriod - LeaderboardScreen.initState now calls loadLeaderboard() instead of loadAll() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6.7 KiB
6.7 KiB