add carousel view

This commit is contained in:
2026-03-11 22:17:42 +01:00
parent 14c72b06d4
commit 383795bff6
6 changed files with 185 additions and 8 deletions

View File

@@ -88,5 +88,21 @@ class TeamProvider extends ChangeNotifier {
Future<List<Map<String, dynamic>>> getTeamMembers(int teamId) {
return _teamService.getTeamMembers(teamId);
}
Future<List<Map<String, dynamic>>> getMyTeamsTournaments() async {
final userTeams = await getUserTeams();
final Set<Map<String, dynamic>> tournamentsSet = {};
for (final team in userTeams) {
try {
final tournaments = await _teamService.getTournamentsByTeam(team.id);
tournamentsSet.addAll(tournaments);
} catch (e) {
// If a team has no tournaments, continue with others
}
}
return tournamentsSet.toList();
}
}