Skip to content

Nitisha620/fitelo

Repository files navigation

fitelo

🏋️‍♀️ 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

  1. Clone the repository git clone https://github.com/nitisha620/fitelo.git cd fitelo

  2. Get dependencies flutter pub get

  3. Run the app flutter run

💾 Local Storage Behavior

  1. The app uses SharedPreferences to save the last selected weight goal.
  2. 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

  1. Scrollable dial for 0–40 kg in 0.5 kg steps
  2. Haptic feedback on each full kg tick
  3. “Recommended” hint card below the dial
  4. Allows continuing with 0 kg (shows note)
  5. Restores last selection on resume

Timeline / Pace Screen

  1. Segmented control for Gentle, Recommended, Intense
  2. Fine-tune via discrete 0.5 month step slider
  3. Highlights preset closest to selected duration

Calorie & Macros Screen

  1. Shows Daily Calories inside a ring chart
  2. Displays Carbs / Protein / Fat in rounded cards 3.Includes info icon (planned bottom sheet) explaining calculations

⚠️ Bottom sheet UI is pending due to missing design reference; logic implemented and ready for integration.

📁 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

  1. Maintenance Calories default to 2200 kcal (editable by user).
  2. Each kg of fat loss = 7700 kcal deficit.
  3. 1 month = 30.4 days (average).
  4. Minimum calories = 1200 kcal safety floor
  5. Dial increments = 0.5 kg steps only.
  6. SharedPreferences persists only weight (other states reset per session).
  7. 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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors