Advantage Calculator Screen
Component Detail
User Interface
high complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Flutter screen that presents the peer mentor's accumulated impact as animated metric cards. Calls the backend on mount, debounces re-calls when the user adjusts input sliders, and uses Riverpod AsyncNotifier for state management. Degrades gracefully offline by displaying the last cached result with a staleness indicator.
advantage-calculator-screen
Responsibilities
- Render impact metrics (professional-hour equivalents, cost savings, social-value score) with AnimatedSwitcher and Tween interpolation
- Expose adjustable input sliders for activity parameters and debounce API re-calls on slider change
- Show staleness indicator widget when displaying a cached offline result
- Integrate with Riverpod AsyncNotifier to manage loading, error, and data states
Interfaces
build(BuildContext) → Widget
onSliderChanged(param, value) → void (debounced)
onRefreshTapped() → Future<void>