Annual Summary Repository
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Data access layer that communicates with the REST API to fetch pre-computed annual summary records. Handles serialization and deserialization of AnnualSummaryData models and maps HTTP errors to domain errors for the service layer.
annual-summary-repository
Responsibilities
- Fetch annual summary from REST API endpoint
- Deserialize JSON response to AnnualSummaryData model
- Map HTTP and network errors to typed domain errors
- Support retry logic for transient network failures
Interfaces
fetchSummary(String userId, int year)
fetchCurrentYearSummary(String userId)
parseSummaryResponse(Map<String, dynamic> json)