Skip to main content

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.

All data in ErgoKawsay is defined as immutable Dart value classes inside lib/data/models/. Every model is const-constructable, carries parallel Es / Qu fields for bilingual content, and exposes convenience accessors such as name(bool isKichwa) that return the correct language variant at call sites. These classes are the building blocks consumed by LocalDataRepository (which vends all static content) and StorageService (which persists user state via SharedPreferences).

Models

Defined in lib/data/models/exercise.dart. Represents a single timed physical exercise belonging to an ExerciseCategory.
FieldTypeDescription
idStringUnique identifier, e.g. "neck_1"
categoryIdStringMaps to an ExerciseCategory.id
nameEsStringExercise name in Spanish
nameQuStringExercise name in Kichwa
descriptionEsStringInstructions in Spanish
descriptionQuStringInstructions in Kichwa
durationSecondsintTimer duration for the exercise
imageAssetString?Optional local asset path for an illustration
imageUrlString?Optional remote image URL
videoUrlString?Optional associated video URL
stepsEsList<String>?Ordered step-by-step instructions in Spanish (nullable)
stepsQuList<String>?Ordered step-by-step instructions in Kichwa (nullable)
Convenience methods
MethodReturns
name(bool isKichwa)nameQu if isKichwa, else nameEs
description(bool isKichwa)descriptionQu if isKichwa, else descriptionEs
steps(bool isKichwa)Bilingual steps list; falls back to [description] if null or empty
Defined in lib/data/models/exercise.dart (same file as Exercise). Groups exercises by body region and drives the category filter UI in ExercisesScreen.
FieldTypeDescription
idStringUnique identifier, e.g. "neck", "shoulders", "vision"
nameEsStringCategory name in Spanish
nameQuStringCategory name in Kichwa
iconNameStringIcon key used to resolve a category icon widget
Convenience methods
MethodReturns
name(bool isKichwa)nameQu if isKichwa, else nameEs
Built-in categories: neck, shoulders, hands, back, hips, legs, vision, breathing.
Defined in lib/data/models/disease.dart. Describes an occupational musculoskeletal disease relevant to teachers, with structured clinical content across five sections.
FieldTypeDescription
idStringUnique identifier, e.g. "carpal_tunnel"
nameEs / nameQuStringDisease name in Spanish / Kichwa
descriptionEs / descriptionQuStringWhat the disease is
causeEs / causeQuStringPrimary occupational cause
warningEs / warningQuStringEarly warning signs
consultEs / consultQuStringWhen to seek medical attention
Convenience methods
MethodReturns
name(bool isKichwa)Bilingual disease name
description(bool isKichwa)Bilingual description
cause(bool isKichwa)Bilingual cause
warning(bool isKichwa)Bilingual warning signs
consult(bool isKichwa)Bilingual consult guidance
Defined in lib/data/models/emotion.dart. Represents a teacher-relevant emotional state with psycho-educational content, a colour identity, and a named character illustration.
FieldTypeDescription
idStringUnique identifier, e.g. "anger", "joy"
nameEs / nameQuStringEmotion name
whatIsEs / whatIsQuStringBrief description of the emotion
causesTitleEs / causesTitleQuString?Optional section heading for causes
causesEs / causesQuStringNewline-separated causes or signals; may be an empty string (e.g. anxiety has no listed causes)
actionsTitleEs / actionsTitleQuString?Optional section heading for coping actions
actionsEs / actionsQuStringNewline-separated coping strategies; may be an empty string (e.g. joy has no listed actions)
phraseEs / phraseQuStringAffirmation or motivational phrase
colorHexintARGB colour value (0xAARRGGBB) for theming the emotion card
iconNameStringIcon key for the emotion chip/icon widget
imageAssetString?Path in assets/emotions/ for the character illustration
Convenience methods
MethodReturns
name(bool isKichwa)Bilingual emotion name
whatIs(bool isKichwa)Bilingual description
causesTitle(bool isKichwa)Bilingual causes section title (nullable)
causes(bool isKichwa)Bilingual causes string
actionsTitle(bool isKichwa)Bilingual actions section title (nullable)
actions(bool isKichwa)Bilingual coping actions string
phrase(bool isKichwa)Bilingual affirmation
Built-in emotions: anger, sadness, joy, fear, anxiety — each mapped to a named character (Rumirumi, YAKU, Inti, Tutam, Chaskym).
Defined in lib/data/models/active_break_step.dart. A single step inside the guided active-break sequence. Five steps form a complete break session (ActiveBreaksScreen).
FieldTypeDescription
idStringUnique identifier, e.g. "neck_rotation"
nameEs / nameQuStringStep name in Spanish / Kichwa
descriptionEs / descriptionQuStringInstructions for the step
durationSecondsintCountdown duration (all built-in steps: 60 s)
Convenience methods: name(bool isKichwa), description(bool isKichwa).Built-in steps: neck_rotation, shoulder_raise, wrist_stretch, lumbar_arch, deep_breathing.
Defined in lib/data/models/tip.dart. An ergonomic or wellness tip shown in TipsScreen and as the daily tip on the home screen.
FieldTypeDescription
idStringUnique identifier, e.g. "chair_desk"
titleEs / titleQuStringShort tip title
contentEs / contentQuStringFull tip body text
iconNameStringIcon key for the tip illustration
Convenience methods: title(bool isKichwa), content(bool isKichwa).Built-in tips: chair_desk, blackboard, laptop, vary_tasks, posture, footwear. The daily tip is selected by LocalDataRepository.tipOfDay() using day-of-year modulo rotation.
Defined in lib/data/models/music_track.dart. Describes an ambient audio track playable by AudioController via the just_audio package.
FieldTypeDescription
idStringUnique identifier, e.g. "forest"
titleEs / titleQuStringTrack title
descriptionEs / descriptionQuStringShort description
assetPathStringFlutter asset path (e.g. assets/audio/Sonido-del-bosque.mp3); used when isAsset is true
isAssetbooltrue → load from Flutter assets via assetPath; false → stream from url
urlString?Remote URL (used when isAsset is false)
Convenience methods: title(bool isKichwa), description(bool isKichwa).Built-in tracks: forest (Sonido del Bosque), rain (Lluvia Suave), energizing (Música Energizante) — all bundled as local assets.
Defined in lib/data/models/video_item.dart. Represents a video resource playable via video_player. Videos are bundled as local assets.
FieldTypeDescription
idStringUnique identifier, e.g. "ergo_posture"
titleEs / titleQuStringVideo title
descriptionEs / descriptionQuStringVideo description
assetPathString?Flutter asset path (e.g. assets/videos/Ergonomia_Postura_correcta.mp4)
urlString?Remote video URL (alternative to assetPath)
Computed property: hasMediatrue if either assetPath or url is non-null and non-empty.Convenience methods: title(bool isKichwa), description(bool isKichwa).Built-in videos: ergo_posture (Ergonomía — Postura Correcta), yoga_10 (5 Minutos de Yoga).
Defined in lib/data/models/progress_data.dart. Tracks the user’s activity across exercises, active breaks, mood check-ins, and calendar usage. Persisted to SharedPreferences as JSON via StorageService.
FieldTypeDescription
exercisesCompletedintTotal exercise sessions completed
activeBreaksCompletedintTotal active break sequences completed
usageDaysList<String>ISO 8601 date strings (YYYY-MM-DD) for days the app was opened
emotionsRecordedMap<String, int>emotionId → count of mood check-ins
lastUsedDateDateTime?Timestamp of the most recent app session
Computed property: totalEmotionsRecorded → sum of all emotion check-in counts.Factory constructors and methods
MethodDescription
ProgressData.empty()Zero-value instance for first launch
copyWith({...})Returns a new instance with overridden fields
toJson()Serialises to Map<String, dynamic>
ProgressData.fromJson(Map)Deserialises from JSON; null-safe with defaults
Defined in lib/data/models/reminder_settings.dart. Configures the notification scheduler in NotificationService. Persisted as JSON.
FieldTypeDefaultDescription
notificationsActivebooltrueMaster toggle for all notifications
breakFrequencyMinutesint60How often active-break reminders fire
dailyExerciseHourint7Hour of day for the daily exercise reminder (24 h)
workStartHourint8Start of the working day window
workEndHourint17End of the working day window
nightSilenceStartHourint20Do-not-disturb window starts
nightSilenceEndHourint6Do-not-disturb window ends
customFrequencyMinutesint45User-defined custom break frequency
reminderTypesList<String>['neck','shoulders','vision','breathing','hydration']Active reminder categories
Static constant: ReminderSettings.allTypes lists all five reminder type keys.Factory constructors and methods
MethodDescription
ReminderSettings.defaults()Returns the out-of-box configuration
copyWith({...})Immutable update
toJson()Serialises to Map<String, dynamic>
ReminderSettings.fromJson(Map)Deserialises; null-safe with defaults
Defined in lib/data/models/accessibility_settings.dart. Controls display accessibility preferences applied globally via AccessibilityController.
FieldTypeDefaultDescription
textSizeTextSizeOptionnormalEnum: normal (1.0×), large (1.18×), extraLarge (1.38×)
colorBlindboolfalseEnables a deuteranopia ColorFilter.matrix over the entire app
Computed property: textScale → resolves TextSizeOption to a double multiplier used by MediaQuery.textScaler.Factory constructors and methods
MethodDescription
AccessibilitySettings.fromJsonString(String?)Parses from a JSON string; returns defaults on null or parse error
copyWith({...})Immutable update
toJson()Serialises to Map<String, dynamic>
AccessibilitySettings.fromJson(Map)Deserialises; null-safe
Defined in lib/data/models/module_item.dart. Represents a navigable feature module shown in the home screen grid, carousels, and bottom navigation. Requires home_category.dart.
FieldTypeDescription
idStringUnique identifier, e.g. "ergonomics", "music"
titleEs / titleQuStringModule display title
subtitleEs / subtitleQuString?Optional subtitle shown under the title
iconIconDataMaterial icon for the module card
routeStringNamed route, e.g. "/ergonomics"
colorColorAccent colour for the module card
homeCategoryHomeCategorySection on the home screen: today, body, mind, or learn
thumbnailAssetString?Local asset path for a card thumbnail image
thumbnailUrlString?Remote URL for a card thumbnail image
Convenience methods
MethodReturns
title(bool isKichwa)Bilingual module title
subtitle(bool isKichwa)Bilingual subtitle; falls back to subtitleEs for Kichwa if subtitleQu is null

LocalDataRepository

LocalDataRepository is a private-constructor singleton (LocalDataRepository.instance) that vends all static content as typed Dart getters. There is no database — all data is defined inline as const object literals compiled into the app binary.
final repo = LocalDataRepository.instance;

Getters

GetterReturn typeDescription
modulesList<ModuleItem>All 10 navigable feature modules
diseasesList<Disease>4 occupational musculoskeletal diseases
activeBreakStepsList<ActiveBreakStep>5-step active break sequence
exerciseCategoriesList<ExerciseCategory>8 exercise categories
exercisesList<Exercise>All exercises across all categories
tipsList<Tip>6 ergonomic / wellness tips
emotionsList<Emotion>5 emotions with psycho-educational content
musicTracksList<MusicTrack>3 bundled ambient audio tracks
videosList<VideoItem>2 bundled educational videos

Query methods

MethodDescription
tipOfDay([DateTime?])Returns the tip for a given date using day-of-year modulo rotation
exerciseOfDay([DateTime?])Returns the exercise for a given date using .day modulo rotation
ergonomicsSections(bool isKichwa)Returns 6 Map<String, String> sections (title + content) for ErgonomicsScreen
exercisesByCategory(String categoryId)Filters exercises by categoryId
modulesByCategory(HomeCategory)Filters modules by homeCategory
modulesForToday()Shorthand for modulesByCategory(HomeCategory.today)
moduleById(String id)Returns the matching ModuleItem or null

Build docs developers (and LLMs) love