56 Commits

Author SHA1 Message Date
Roland Geider
c2f138cf9f Increase timeout durations for API requests 2026-01-30 13:50:35 +01:00
Roland Geider
92aee1228e Properly filter hidden widgets 🙄 2026-01-19 16:39:06 +01:00
Roland Geider
f5a591a3b7 Add trophies to configurable dashboard lists 2026-01-17 14:01:17 +01:00
Roland Geider
36bf6aa8fc Merge branch 'master' into feature/trophies
# Conflicts:
#	lib/main.dart
#	lib/screens/dashboard.dart
2026-01-17 13:50:18 +01:00
Roland Geider
b81331609a Also allow changing the order of the dashboard widgets
This makes the behaviour more consistent and allows users to remove widgets
they won't be using, like the trophies
2026-01-17 13:43:28 +01:00
Roland Geider
5574f74a2f Move dashboard visibility settings to own screen
This seems cleaner and can be opened from other places
2026-01-17 12:50:07 +01:00
Roland Geider
3664da4f78 Merge branch 'master' into fork/dhituval/issue852/hide-diet-plan 2026-01-16 23:06:11 +01:00
Roland Geider
ec153c51df i18n and other cleanup 2026-01-16 17:33:28 +01:00
Roland Geider
dce1b79683 Merge branch 'master' into feature/trophies
# Conflicts:
#	lib/providers/base_provider.dart
#	lib/providers/gym_state.dart
#	lib/providers/gym_state.g.dart
#	lib/widgets/routines/gym_mode/log_page.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/gallery/gallery_form_test.mocks.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_plan_screen_test.mocks.dart
#	test/nutrition/nutritional_plans_screen_test.mocks.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/routine_screen_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/user/provider_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/widgets/routines/gym_mode/log_page_test.dart
2026-01-16 16:54:08 +01:00
Roland Geider
46fdf1efc7 Recreate generated files 2026-01-16 15:28:09 +01:00
Roland Geider
6620a83baa Improve html error detection
In case the header is not correctly set, try to detect html error messages
from the content itself
2026-01-14 14:59:07 +01:00
Roland Geider
574ef3d0b5 Add simple retry logic to the base provider's fetch method
This should take care of simple transient errors, or other network hiccups
that might happen on the user's device.
2026-01-14 13:59:41 +01:00
Roland Geider
fb6a673503 Simplify code by adding new log provider
This makes the logic for copying or modifying the logs much easier. Also,
there were some user reports that the old logic sometimes behaved erratically
and old values were sometimes reverted.
2026-01-12 21:40:11 +01:00
Roland Geider
52892db9b1 Allow passing the language to the fetch request
This allows us to use the trophy translations from the server.
2025-12-23 15:41:47 +01:00
Roland Geider
536f18805b Load context data for PR trophies
This allows us to show for which sets the user achieved new PRs
2025-12-21 20:40:20 +01:00
Roland Geider
36a3e7ef4a Add overview page for the trophies 2025-12-20 21:25:18 +01:00
Roland Geider
d187324a25 Properly handle null values
Basically all the fields can be nullable, so we need to set them if
we want to avoid LateInitialisation errors.
2025-12-18 10:58:40 +01:00
Roland Geider
077dcaf742 Handle HTML errors in WgerHttpException
These need to be handled separately when the server encounters an error and
returns HTML instead of JSON.
2025-12-17 18:59:45 +01:00
Diya Hituvalli
fa00cad406 added test stubs 2025-12-08 15:13:21 -05:00
Roland Geider
ecd0b6c6b4 Add overview page when a workout has been completed 2025-11-26 20:17:02 +01:00
Roland Geider
5f61af3b66 Update generated files 2025-11-20 23:01:20 +01:00
Roland Geider
ae6db6ee07 Move to riverpod three
Needed to downgrade build_runner and mockito for now
2025-11-11 13:22:18 +01:00
Roland Geider
85ba00b654 Merge branch 'master' into feature/day-type
# Conflicts:
#	lib/models/workouts/day.g.dart
#	lib/models/workouts/day_data.g.dart
#	lib/models/workouts/set_config_data.g.dart
#	lib/models/workouts/slot_data.g.dart
#	lib/models/workouts/slot_entry.g.dart
#	lib/models/workouts/weight_unit.g.dart
#	test/auth/auth_screen_test.mocks.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/gallery/gallery_form_test.mocks.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_categories_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
#	test/nutrition/nutritional_plan_screen_test.mocks.dart
#	test/nutrition/nutritional_plans_screen_test.mocks.dart
#	test/other/base_provider_test.mocks.dart
#	test/routine/day_form_test.mocks.dart
#	test/routine/gym_mode_screen_test.mocks.dart
#	test/routine/gym_mode_session_screen_test.mocks.dart
#	test/routine/repetition_unit_form_widget_test.mocks.dart
#	test/routine/routine_edit_screen_test.mocks.dart
#	test/routine/routine_edit_test.mocks.dart
#	test/routine/routine_form_test.mocks.dart
#	test/routine/routine_logs_screen_test.mocks.dart
#	test/routine/routine_screen_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/routine/slot_entry_form_test.mocks.dart
#	test/routine/weight_unit_form_widget_test.mocks.dart
#	test/user/provider_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
2025-10-09 17:39:39 +02:00
Roland Geider
93a11a16e4 Recreate generated files and reformat the repo
Seems the default dart formatting rules changed recently, and this was causing
huge diffs in branches
2025-10-09 17:39:02 +02:00
Roland Geider
0add2a6bd1 Extract url validator to its own file 2025-10-08 14:03:25 +02:00
Roland Geider
136d0e0825 Extract some logic to their own widgets 2025-10-06 12:43:05 +02:00
Roland Geider
39be6a3edf Allow setting the day type in the edit form 2025-10-06 11:36:27 +02:00
Roland Geider
ccbaf0b42a Allow multiple weight entries per day 2025-09-26 12:21:50 +02:00
Roland Geider
530efd366e Some renaming 2025-09-24 12:31:28 +02:00
Roland Geider
84c29eb209 Use the regular ingredient endpoint, instead of the special search one 2025-09-24 01:35:03 +02:00
Roland Geider
798406eaa9 Make routineId nullable in session and related files
Sessions can be added ad-hoc, without needing to be part of any specific
routine.
2025-09-16 14:47:47 +02:00
Roland Geider
d85ee13ed9 Give users more control over the exercise cache
This allows users to manually refresh the cache and load all exercises
from the server.
2025-09-06 15:05:52 +02:00
Shininess8816
97e63e3fc5 flutter pub run build_runner build && dart format --line-length=100 . 2025-05-08 22:36:14 +01:00
Roland Geider
9ebaf58fea Refactor routine handling for the dashboard widgets
This makes sure that edits to the routine (such as changing the order
of the days, etc.) are properly reflected in the dashboard.
2025-05-03 15:39:46 +02:00
Roland Geider
df06cef398 await for all setExercisesAndUnits calls
Not setting the "await" was causing the method to be run asynchronously which means
that sometimes these would get called several times for the same exercise, which in
turn would cause exercises to be written several times to the local db, polluting the
exercise list, etc. etc.

We increase the schemaVersion of the database because this causes all the cache tables
to be dropped and re-created
2025-03-29 16:37:11 +01:00
Roland Geider
301f48a966 More renaming of exercise base to just exercise 2025-03-29 15:50:13 +01:00
Roland Geider
c28ec70fb6 Fix borked imports? 2025-03-29 14:50:41 +01:00
Roland Geider
47f6aa36d3 Formatting 2025-03-29 14:32:58 +01:00
Yashas H Majmudar
d31dc16bcf migration: migrated all instances of sharedPreferences to sharedPreferencesAsync for tests 2025-03-23 14:26:28 -04:00
Roland Geider
d071d143df Update flutter to 3.29
The translations are not stored in a synthetic package anymore, but the
files are just copied to a specific folder so it can be more easily imported

Also, flutter_barcode_scanner was replaced by simple_barcode_scanner since
the first hasn't been updated in 3 years and was already causing problems
for some time
2025-03-18 17:28:19 +01:00
Roland Geider
f987de1b4d Handle case where an exercise has no variations 2025-03-18 14:59:33 +01:00
Roland Geider
202349c5bc Make workout log charts work again 2025-01-25 15:39:51 +01:00
Roland Geider
079db5d5e0 Recreate generated files 2025-01-24 15:07:51 +01:00
Roland Geider
eff176f035 Merge branch 'master' into feature/flexible-routines
# Conflicts:
#	lib/main.dart
#	lib/models/exercises/exercise.dart
#	lib/models/exercises/exercise_api.freezed.dart
#	lib/models/workouts/day.g.dart
#	lib/models/workouts/session.g.dart
#	lib/models/workouts/workout_plan.g.dart
#	lib/providers/exercises.dart
#	lib/widgets/core/settings.dart
#	pubspec.lock
#	test/auth/auth_screen_test.mocks.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/gallery/gallery_form_test.mocks.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_categories_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
#	test/nutrition/nutritional_plan_screen_test.mocks.dart
#	test/nutrition/nutritional_plans_screen_test.mocks.dart
#	test/other/base_provider_test.mocks.dart
#	test/user/provider_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
#	test/workout/gym_mode_screen_test.mocks.dart
#	test/workout/repetition_unit_form_widget_test.mocks.dart
#	test/workout/routine_screen_test.mocks.dart
#	test/workout/routines_provider_test.mocks.dart
#	test/workout/routines_screen_test.mocks.dart
#	test/workout/weight_unit_form_widget_test.mocks.dart
#	test/workout/workout_day_form_test.mocks.dart
#	test/workout/workout_form_test.mocks.dart
#	test/workout/workout_set_form_test.mocks.dart
2025-01-24 15:05:28 +01:00
Roland Geider
dad109d5bd Inject the shared preferences class for easier testing 2025-01-24 13:59:08 +01:00
Roland Geider
86f8b7ae35 Add a third option to the theme mode
This allows the user to use the system settings as well, and not always force
light or dark mode in the app. Also move the logic to the UserProvider and
do some light refactoring.
2025-01-23 23:22:50 +01:00
Roland Geider
23119e68d5 Allow users to reorder the days and the slots within the days 2024-11-15 16:44:41 +01:00
Roland Geider
abf9413f4b Start rendering the new routines 2024-11-02 17:28:24 +01:00
Roland Geider
7db93f0b6e Start implementing new flexible routines 2024-10-30 12:14:26 +01:00
Roland Geider
906fa7257a Rename function 2024-09-29 11:45:31 +02:00