Team Stats Store
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Riverpod state store that holds cached team report data for the current coordinator session, keyed by association ID and active filter set. Stores aggregated totals, mentor breakdowns, and trend data locally to support fast UI re-renders when filters change without requiring a full network round-trip. Separate from the personal Stats Store which holds individual mentor data.
team-stats-store
Responsibilities
- Cache team report API responses keyed by associationId + filter hash
- Provide reactive state for Team Report Screen to observe
- Invalidate stale cache entries after TTL or on explicit refresh
- Store paginated mentor breakdown pages incrementally
- Hold export payload data ready for formatting
Interfaces
getReport(String associationId, String filterHash)
setReport(String associationId, String filterHash, TeamReportData data)
appendMentorPage(String associationId, int page, List<MentorBreakdown> mentors)
invalidate(String associationId)
invalidateAll()
isStale(String associationId, String filterHash)
getExportPayload(String associationId)