The Nudges Model serves as the content repository for the app’s behavioral intervention system. It defines a catalog of “Insight Nudges”—educational and corrective prompts that trigger when specific usage patterns (like “Doomscrolling” or “Morning Traps”) are detected.To the user, these represent the various “smart alerts” they can enable to build better digital habits. To the system, this module provides the metadata (titles, descriptions, and icons) required to render these interventions in the UI.
This module acts as a static and configuration provider. It sits at the bottom of the UI layer, providing the “Source of Truth” for nudge descriptions.
A hardcoded List that acts as the registry for all supported nudges. This centralized list ensures that content remains consistent across the settings screen and the actual nudge overlays.
Since the data is defined as a top-level val, it is initialized when the class is first accessed. There is no asynchronous loading or overhead for this specific metadata.
From a data perspective, this module is the “Static Catalog” in a larger system.
Source: Hardcoded static objects. In a more complex implementation, these might be fetched from a remote config service (like Firebase Remote Config) to update nudge text without an app update.
Transformation: The UI layer typically maps this list into a within a .
Resource Mapping: It uses standard Android R.drawable references, ensuring that the UI layer can directly consume the iconRes without further translation.