🏋️♀️ Fitelo Goal Setup Flow
A 3-screen Flutter app that guides the user through selecting a weight loss goal, choosing a timeline/pace, and viewing a computed calorie + macro breakdown based on deterministic logic. This app follows a modular architecture with Bloc for state management and SharedPreferences for local persistence.
🧱 Project Overview App Flow
| Step | Screen | Description |
|---|---|---|
| 1️⃣ | Weight Goal | User selects a goal between 0–40 kg |
| 2️⃣ | Timeline / Pace | Choose Gentle / Recommended / Intense |
| 3️⃣ | Calorie & Macros | View computed daily calories and macros |
🧩 Tech Stack
Flutter (v3.35.5) Bloc (for reactive state management) SharedPreferences (for local storage) Modular architecture (Layer folder organization)
⚙️ Setup Instructions
-
Clone the repository git clone https://github.com/nitisha620/fitelo.git cd fitelo
-
Get dependencies flutter pub get
-
Run the app flutter run
💾 Local Storage Behavior
- The app uses SharedPreferences to save the last selected weight goal.
- On app restart, it restores the saved value automatically.
Stored key example: SharedPreferencesUtil.setDouble('weight', goalKg);
🧮 Calorie Computation Logic
Given: Maintenance Calories (default: 2200 kcal) Energy per kg fat: 7700 kcal
| Variable | Formula |
|---|---|
| Total deficit | goalKg * 7700 |
| Days | months * 30.4 |
| Daily deficit | totalDeficit / days |
| Daily calories | max(1200, maintenance - dailyDeficit) |
| Macros | Carb 45%, Protein 30%, Fat 25% |
| Conversion | Carbs/Protein ÷ 4, Fat ÷ 9, rounded to nearest 5 g |
If goal = 0 kg, the app defaults to maintenance calories.
🧠 UI & UX Details Weight Goal Screen
- Scrollable dial for 0–40 kg in 0.5 kg steps
- Haptic feedback on each full kg tick
- “Recommended” hint card below the dial
- Allows continuing with 0 kg (shows note)
- Restores last selection on resume
Timeline / Pace Screen
- Segmented control for Gentle, Recommended, Intense
- Fine-tune via discrete 0.5 month step slider
- Highlights preset closest to selected duration
Calorie & Macros Screen
- Shows Daily Calories inside a ring chart
- Displays Carbs / Protein / Fat in rounded cards 3.Includes info icon (planned bottom sheet) explaining calculations
📁 Folder Structure (Simplified) lib/ ├── bloc/ │ └── goal_setup_bloc.dart | └── goal_setup_event.dart | └── goal_setup.state.dart ├── presentation/ │ ├── goal_weight_screen.dart │ ├── pace_selection_screen.dart │ └── calorie_result_screen.dart ├── styles/ │ ├── app_text_style.dart │ └── app_theme.dart ├── utils/ │ ├── shared_pref_util.dart │ └── enum.dart └── main.dart
🧾 Assumptions
- Maintenance Calories default to 2200 kcal (editable by user).
- Each kg of fat loss = 7700 kcal deficit.
- 1 month = 30.4 days (average).
- Minimum calories = 1200 kcal safety floor
- Dial increments = 0.5 kg steps only.
- SharedPreferences persists only weight (other states reset per session).
- Bottom sheet for info not yet built (UI reference pending).
📹 Deliverables Summary
| Deliverable | Status |
|---|---|
| 🎥 Video demo (≤ 3 min) | ✅ Link |
| 📱 APK (release build) | ✅ Link |
| 💻 GitHub repository | ✅ With modular code |
| 🧾 README (Setup + Assumptions) | ✅ (This file) |