FitLog is a Flutter mobile app for logging strength-training workouts. It is aimed at lifters and gym-goers who want a simple, offline-first log: manage a personal exercise library, run a timed session with multiple exercises and per-set reps/weight, and review past sessions with clear summaries.
| Name | Role |
|---|---|
| Teamir | Developer — Flutter UI, navigation, workout flow |
| Ammanuel | Developer — Flutter, SQLite data layer, features |
- Bottom NavigationBar with five sections: Home, Workout, Exercises, History, Settings (state preserved with
IndexedStack). - Material 3 light/dark themes driven by user preference.
- Welcome header and Recent Workouts (up to five, newest first).
- Pull-to-refresh to reload from the database.
- Floating action button — Start Workout (same flow as the Workout tab).
- Empty state when there are no workouts yet.
- Workout tab: short intro and Start Workout button.
- Start Workout screen:
- Optional workout name and notes.
- Session timer in the app bar (updates every second); duration stored in whole minutes when you finish.
- Add exercise — picker lists all exercises; optional Create new exercise (name + muscle group) without leaving the flow.
- Each exercise is a block with one or more sets; each set has reps and weight (UI labeled kg).
- Add set / delete set (minimum one set per exercise), remove exercise from the session.
- Finish workout — validates, writes workout + line items + individual sets to SQLite, notifies listeners, returns with success snackbar.
- Back with unsaved exercises triggers discard confirmation (
PopScope).
- List of all exercises (name + muscle group), sorted by name (case-insensitive).
- Add via dialog (name, muscle group from fixed list: Chest, Back, Legs, Shoulders, Arms, Core, Cardio).
- Edit on tap.
- Swipe-to-delete with confirmation.
- Refresh (app bar and pull-to-refresh) and loading/empty states.
- Full list of workouts, newest date first.
- Cards show title (custom workout name if set, otherwise formatted date), date, duration, notes preview.
- Tap opens Workout detail; Refresh in app bar and pull-to-refresh.
- After delete from detail, list refreshes and a snackbar confirms deletion.
- Card with name (if any), date, duration, notes.
- Exercises section: each movement grouped with Set N — reps and kg from
workout_sets. - Delete workout from app bar (with confirmation); cascaded rows removed in the database.
- Dark mode toggle — persisted with SharedPreferences across restarts.
- About card with app name and version 1.0.0 (matches
pubspec.yaml).
- Local SQLite database (
fitlog.db), version 5, with foreign keys enabled and migrations from older schemas. - Preset exercises seeded on first create when the exercises table is empty.
- Provider:
ThemeProvider,WorkoutRefreshNotifier(workout list refresh after saving a session).
| Category | Details |
|---|---|
| Framework | Flutter (Material) |
| Language | Dart — SDK constraint ^3.10.7 in pubspec.yaml (use a Flutter stable release compatible with that Dart SDK; run flutter --version on your machine to record the exact Flutter version for your report). |
| State | provider ^6.1.2 |
| Database | sqflite ^2.3.3, path ^1.9.0 |
| Preferences | shared_preferences ^2.3.2 |
| Icons | cupertino_icons ^1.0.8 |
| Linting | flutter_lints ^6.0.0 (dev) |
| Tools | Android Studio / Xcode (or VS Code + Flutter extension), emulator or physical device |
- Flutter SDK installed and on your
PATH(flutter doctor). - Dart (bundled with Flutter) satisfying
sdk: ^3.10.7inpubspec.yaml. - Android Studio and/or Xcode for mobile targets, or Windows desktop support if you target Windows.
-
Open the project (this repo’s Flutter root is the folder that contains
pubspec.yaml).cd FitLogIf your clone has an extra parent folder,
cduntil you seepubspec.yaml. -
Install packages
flutter pub get
-
Check your environment
flutter doctor
-
Run the app
flutter run
-
Optional: release builds
flutter build apk # or flutter build ios # or flutter build windows
- First launch — preset exercises are available immediately. Open Exercises to browse or add custom movements.
- Start a session — from Home (FAB) or Workout → Start Workout. Enter an optional name and notes, tap Add exercise, pick or create an exercise, then enter reps and weight per set. Use Add set as needed.
- Finish — tap Finish workout to save. You’ll return to the previous screen and see a confirmation; Home and History update when the refresh notifier runs (see Known Issues for detail delete).
- Review — open History, tap a workout for full detail and per-set breakdown. Delete from the detail screen if needed.
- Appearance — Settings → Dark mode.
Add PNG or JPEG files under a screenshots/ folder next to this README so the images render on GitHub and in IDEs. Suggested captures:
| File | What to show |
|---|---|
screenshots/01-home.png |
Home with recent workouts or empty state |
screenshots/02-start-workout.png |
Start Workout with timer and exercise blocks |
screenshots/03-exercises.png |
Exercise manager list |
screenshots/04-history.png |
History list |
screenshots/05-workout-detail.png |
Workout detail with sets |
screenshots/06-settings.png |
Settings with dark mode |
Example markup (after you add the files):
Database file: fitlog.db. Version: 5 (DatabaseHelper._dbVersion). Foreign keys: PRAGMA foreign_keys = ON.
erDiagram
exercises ||--o{ workout_exercises : "exercise_id"
workouts ||--o{ workout_exercises : "workout_id"
workout_exercises ||--o{ workout_sets : "workout_exercise_id"
| Column | Type | Constraints |
|---|---|---|
exercise_id |
INTEGER | PRIMARY KEY AUTOINCREMENT |
exercise_name |
TEXT | NOT NULL |
muscle_group |
TEXT | NOT NULL |
equipment |
TEXT | NOT NULL DEFAULT "" |
| Column | Type | Constraints |
|---|---|---|
workout_id |
INTEGER | PRIMARY KEY AUTOINCREMENT |
workout_date |
TEXT | NOT NULL (stored as YYYY-MM-DD) |
duration |
INTEGER | NOT NULL DEFAULT 0 (minutes) |
notes |
TEXT | nullable |
workout_name |
TEXT | NOT NULL DEFAULT "" |
Joins a workout to an exercise. Legacy columns sets, reps, weight remain for older rows; new sessions primarily persist volume in workout_sets.
| Column | Type | Constraints |
|---|---|---|
id |
INTEGER | PRIMARY KEY AUTOINCREMENT |
workout_id |
INTEGER | NOT NULL, FK → workouts(workout_id) ON DELETE CASCADE |
exercise_id |
INTEGER | NOT NULL, FK → exercises(exercise_id) ON DELETE CASCADE |
sort_order |
INTEGER | NOT NULL DEFAULT 0 |
sets |
INTEGER | NOT NULL DEFAULT 0 |
reps |
INTEGER | NOT NULL DEFAULT 0 |
weight |
REAL | NOT NULL DEFAULT 0.0 |
One row per set; unique on (workout_exercise_id, set_index).
| Column | Type | Constraints |
|---|---|---|
id |
INTEGER | PRIMARY KEY AUTOINCREMENT |
workout_exercise_id |
INTEGER | NOT NULL, FK → workout_exercises(id) ON DELETE CASCADE |
set_index |
INTEGER | NOT NULL (0-based) |
reps |
INTEGER | NOT NULL DEFAULT 0 |
weight |
REAL | NOT NULL DEFAULT 0.0 |
UNIQUE(workout_exercise_id, set_index) |
- Home vs. History after delete — Deleting a workout from Workout detail does not call
WorkoutRefreshNotifier. History refreshes when you return from detail, but Home may still show the old recent list until pull-to-refresh or another save triggers a refresh. - Recent workouts on Home are not tappable — Cards are informational only; open History to view or delete a session.
equipmentcolumn — Present in SQLite and models, but the Exercise Manager and in-workout “create exercise” flows do not edit it (stored as empty string).- Weight unit — UI assumes kg; no pounds/stone toggle.
- Duration — Saved as whole minutes from the session stopwatch (sub-minute training time is truncated).
- Dates — Stored as date strings; displayed formats are simple (e.g. MM/DD/YYYY in some screens), not fully locale-aware.
- No cloud sync — All data is on-device; uninstall clears the app data unless the OS backs it up.
- Tests — Only the default Flutter widget test scaffold; no broad automated test suite.
- Notify
WorkoutRefreshNotifier(or equivalent) when a workout is deleted so Home stays in sync. - Tappable recent workouts on Home opening the same detail screen as History.
- Exercise equipment field in add/edit UI; optional unit preference (kg/lb).
- Search/filter for exercises and history; charts and personal records.
- Workout templates and duplicate-last-session shortcuts.
- Export/import (CSV/JSON) and optional cloud backup.
- Richer localization, accessibility audits, and expanded widget/integration tests.
This project is licensed under the MIT License.
Copyright (c) 2026 Teamir, Ammanuel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

