Reset is a Flutter habit-tracking project organized around personal reflection, pledges, motivations, and progress history. Its portfolio includes a web introduction alongside the application source.
My implementation focus#
The implementation focus is a habit model that can evolve while preserving earlier records. Flutter and Provider manage application state; Firebase Authentication and Firestore support user-scoped persistence.
The inspected model records the start date, motivations, history, gratitude, triggers, pledge date, and streak-related values. This case study discusses that application structure, without presenting it as clinical treatment or reporting recovery outcomes.
Preserve older record shapes#
Motivation data moved from a single string to a list. The model reader accepts either representation and converts the older string into a list. Start dates similarly support Firestore timestamps and stored date strings.
Compatibility belongs at the data boundary. Once the record is read, the interface can work with a consistent model rather than repeatedly checking legacy shapes.
Scope activity to the selected habit#
Trigger logs and pledge histories live under the authenticated user's habit path. The provider requires a user identifier and uses the selected habit when reading or writing those records.
Motivation actions use Firestore array operations. Adding, removing, and replacing values have different persistence behavior; changing the visible list alone would not update the stored record.
Demonstrable result and limitations#
The source shows how reflection data and older records can coexist in one application model. It does not demonstrate clinical effectiveness, a measured retention benefit, or a full audit of Firebase rules. Invalid-date fallbacks also deserve explicit review as the data model evolves.
The companion article covers compatibility in a changing Flutter habit model.
