A fully offline-first 28-day structured diet tracking mobile application built with Flutter (iOS + Android).
This app is designed to help users follow a strict 28-day diet program with daily meal tracking, automated reminders, and progress visualization β all without any backend server.
Switch-On Diet is a minimal yet structured habit-tracking app focused on consistency and discipline over 28 days.
The app runs completely offline and stores all user data locally on the device.
"Start once, stay consistent for 28 days."
- Automatically calculates current day (Day N)
- Based on user-defined start date
- Fixed 28-day cycle
- Welcome screen on first launch
- "Start" button initializes program
- Saves
startDatelocally - Skips onboarding on future launches
Each day includes:
- Breakfast
- Lunch
- Snack
- Dinner
Users can check off meals as completed.
Dynamic weekly diet rules:
- Days 1β3: vegetables, tofu, yogurt only
- Day 4+: expanded diet (eggs, fish, meat, etc.)
-
When a meal is checked:
- Reminder notification after 5h 45m
- Follow-up reminder after 6h 30m if incomplete
Fully implemented using local notification system only (no backend)
- Confetti / fireworks animation when all meals are completed
- Positive reinforcement for consistency
- Simple notification toggle (ON / OFF only)
- Minimal configuration by design
- Fully offline-first architecture
- Export user data as JSON file
- Import data to restore or transfer to another device
The app follows a clean, scalable Flutter architecture:
lib/
βββ core/ # utilities, constants, helpers
βββ data/ # local storage, models
βββ domain/ # business logic
βββ presentation/ # UI screens
- Offline-first
- Separation of concerns
- Feature-based modular structure
- Recommended: Riverpod / Provider / Bloc
- Local state persists using SQLite / Hive
-
Uses
flutter_local_notifications -
Schedule-based reminder system:
- Trigger 1: +5h 45m after check
- Trigger 2: +6h 30m fallback reminder
- Flutter
- Dart
- Hive / SQLite
flutter_local_notifications- Lottie / Confetti
- File system API (JSON export/import)
{
"startDate": "2026-01-01",
"days": [
{
"day": 1,
"meals": {
"breakfast": true,
"lunch": false,
"snack": true,
"dinner": true
}
}
]
}- App reinstall resets local data unless exported
- iOS may delay scheduled notifications
- Timezone changes may affect Day calculation
- 28-day overflow must be handled safely
- Background execution is limited on mobile OS
This project demonstrates:
- Offline-first mobile architecture
- Local persistence strategy
- Time-based scheduling logic
- Clean Flutter project structuring
- Real-world product thinking
- Apple Health / Google Fit integration
- Cloud sync (optional)
- Habit streak system
- Dark mode
- AI diet suggestions
Portfolio project showcasing Flutter architecture and offline-first mobile system design.
For educational and portfolio use.