Seeing tangible evidence of effort is one of the most powerful motivators for sustaining healthy habits. The Progress screen surfaces a clear, at-a-glance view of every session a teacher has completed — exercises, active breaks, emotions recorded, and calendar days the app was opened — all sourced entirely from on-device storage. No account, no cloud sync, and no personal data ever leaves the device. The screen supports pull-to-refresh so that stats update instantly after a session completes in another part of the app. An embedded variant (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Cristiang1021/ErgoKawsay/llms.txt
Use this file to discover all available pages before exploring further.
embedded: true) is also available for rendering Progress inline within the home tab without a separate navigation push.
Tracked Metrics
Exercises Completed
Running total of full exercise sessions the teacher has finished. Incremented by
storage.recordExerciseCompleted() at the end of each guided exercise flow.Active Breaks Completed
Running total of completed active break sequences. Incremented by
storage.recordActiveBreakCompleted() when a break sequence reaches its final step.Emotions Recorded
Total number of emotion diary entries across all sessions, derived from
ProgressData.totalEmotionsRecorded (the sum of all values in the emotionsRecorded map). Individual emotion counts are also shown in the emotion history list below the stat tiles.Days Used
Number of unique calendar days on which the app was opened, stored as
YYYY-MM-DD formatted date strings in ProgressData.usageDays. Computed as usageDays.length.ProgressData Model
TheProgressData class is the single source of truth for all progress information. It is immutable (all mutations return a new instance via copyWith) and fully JSON-serializable.
toJson() and is reconstructed with ProgressData.fromJson(). Missing or null fields fall back to their zero-value defaults, making forward-compatibility safe when new fields are added.
Recording Actions
All write operations go throughStorageService, which reads the current ProgressData, applies the increment, and immediately writes the updated object back to SharedPreferences. Every method returns the updated ProgressData so callers can react to the new state without a second read.
recordAppOpen() converts usageDays to a Set<String> internally before adding today’s key, then converts back to List<String> before saving. Calling it multiple times on the same day will not inflate the usageDays count.Persistence
Progress data is serialized to JSON and stored in SharedPreferences under the keyAppConstants.keyProgress ("progress").
ProgressData.toJson() map contains the following keys:
| JSON Key | Dart Type | Description |
|---|---|---|
exercisesCompleted | int | Total exercise sessions |
activeBreaksCompleted | int | Total active break sequences |
emotionsRecorded | Map<String, int> | Per-emotion counts keyed by emotionId |
usageDays | List<String> | Unique YYYY-MM-DD date strings |
lastUsedDate | String? | ISO 8601 timestamp or null |
Emotion History
Below the four stat tiles, the screen renders a scrollable list of every emotion the teacher has logged, matched to a localized name fromLocalDataRepository.instance.emotions. Each row displays the emotion’s name (in Spanish or Kichwa depending on the current locale) and a pill badge showing its count. If no emotions have been recorded yet, a “No data” placeholder is shown instead.
The emotionsRecorded field is a Map<String, int> where each key is an emotionId string and the value is the number of times that emotion has been recorded.
Route
Navigate to the Progress screen via the named route/progress. The screen can also be embedded directly within a parent Scaffold by constructing it with embedded: true.