Skip to content

Latest commit

ย 

History

History
114 lines (90 loc) ยท 4.16 KB

File metadata and controls

114 lines (90 loc) ยท 4.16 KB

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)