Dashboard API Client
Component Detail
Infrastructure
low complexity
mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
REST API client for the /api/v1/dashboard endpoint, attaching JWT Bearer tokens and role-scoped query parameters to all requests. Handles HTTP error codes and maps them to typed application exceptions consumed by DashboardDataService.
dashboard-api-client
Responsibilities
- Construct authenticated GET requests to /api/v1/dashboard with role query parameters
- Attach JWT Bearer token from secure token storage to Authorization request headers
- Deserialize JSON response payload into typed DashboardResponse models using fromJson factories
- Map HTTP error codes (401, 403, 500) to typed DashboardApiException subtypes
Interfaces
getDashboard(String role) → Future<DashboardResponse>
DashboardResponse.fromJson(Map<String, dynamic> json) → DashboardResponse
DashboardApiException(int statusCode, String message)