Roland Geider
675fb44c6e
Also properly handle (for now) unused datetime fields
2026-06-05 15:36:19 +02:00
Roland Geider
662ad9befc
Properly handle timezones
2026-06-05 15:17:32 +02:00
Roland Geider
e29c120d7f
Add more validators
...
Otherwise the server might reject the values (this was already the case)
2026-06-04 21:42:02 +02:00
Roland Geider
5b9be7440c
Add more validators to the slot configs
...
Otherwise the server might reject the values (this was already the case)
2026-06-04 21:26:56 +02:00
Roland Geider
0f4a12251d
Better validators for workout session notes
2026-05-25 13:31:20 +02:00
Roland Geider
af8ed102eb
Also write to the user profile via powersync
2026-05-22 17:59:16 +02:00
Roland Geider
51730e956e
Make more widgets online-aware
2026-05-22 16:49:59 +02:00
Roland Geider
11699f8ee0
Slightly increase the maximum workout duration
2026-05-08 11:10:29 +02:00
Roland Geider
130232ead8
Remove null assertions where not needed
2026-05-08 10:58:40 +02:00
Roland Geider
83569fc41e
Merge remote-tracking branch 'origin/master' into feature/offline-mode
2026-05-07 22:05:41 +02:00
Roland Geider
39eaf9abe0
Make the linter happy
2026-05-07 21:42:23 +02:00
Roland Geider
8e05d3ab10
Fix linting problems
2026-05-07 17:38:23 +02:00
Roland Geider
1ec921faf3
Consistent usage of uuid IDs
...
Now these fields are always nullable on the model and get a value once they
are persisted to the (local) database.
2026-05-03 12:17:23 +02:00
Roland Geider
c1dccbd822
Make the "impression" in workout session an enum
...
This is cleaner and simplifies a handful of places
2026-05-03 12:17:23 +02:00
pankaj-basnet
f578938655
refactor(models): add copyWith to Routine and make replaceExercise immutable
2026-05-03 02:29:39 +05:45
Roland Geider
e0068e96ce
Hydrate exercise and unit objects in routine entries
2026-04-29 19:32:48 +02:00
Roland Geider
271d9f9835
Refactor unit selection for repetitions and weight
...
This is now done inline with a suffix icon, instead of having an extra
toggle that showed an explicit dropdown. Existing logs can now be edited
in the routine log overview page.
2026-04-29 16:56:06 +02:00
Roland Geider
680127e139
Sync the base Routine and Nutritional plan entries via powersync
...
This makes sure the lists is always kept current and allows the user to edit
them offline as well. Note that we still kepp the backend's ID here, so no
creation is possible.
2026-04-29 10:03:59 +02:00
Roland Geider
30072fb2cc
Properly handle timezones for datetime values
2026-04-24 10:35:13 +02:00
Roland Geider
9a4fec8bf3
Refactor the workout session provider
...
The logs are read in the session repository, the logs one is only used
for CRUD operations
2026-04-18 18:19:31 +02:00
Roland Geider
70dff579d4
Fix tests
2026-04-17 15:46:34 +02:00
Roland Geider
9c531a7799
Merge branch 'master' into feature/offline-mode
...
# Conflicts:
# integration_test/1_dashboard.dart
# integration_test/3_gym_mode.dart
# ios/Podfile.lock
# lib/database/exercises/exercise_database.dart
# lib/database/exercises/type_converters.dart
# lib/models/exercises/exercise.dart
# lib/models/exercises/exercise.g.dart
# lib/models/exercises/exercise_api.dart
# lib/models/exercises/exercise_api.freezed.dart
# lib/models/exercises/exercise_api.g.dart
# lib/models/exercises/translation.dart
# lib/models/exercises/translation.g.dart
# lib/models/exercises/variation.dart
# lib/providers/exercises.dart
# lib/widgets/add_exercise/steps/step_1_basics.dart
# lib/widgets/add_exercise/steps/step_2_variations.dart
# lib/widgets/exercises/exercises.dart
# lib/widgets/measurements/forms.dart
# lib/widgets/routines/forms/slot.dart
# pubspec.lock
# pubspec.yaml
# test/core/settings_test.mocks.dart
# test/exercises/contribute_exercise_image_test.mocks.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/exercises/exercise_provider_load_test.dart
# test/exercises/exercise_provider_test.dart
# test/exercises/exercises_detail_widget_test.dart
# test/exercises/exercises_detail_widget_test.mocks.dart
# test/exercises/model_exercise_test.dart
# test/measurements/measurement_entries_screen_test.dart
# test/routine/gym_mode/gym_mode_test.dart
# test/routine/gym_mode/gym_mode_test.mocks.dart
# test/routine/routines_provider_test.mocks.dart
# test/weight/weight_screen_test.mocks.dart
# test/widgets/routines/gym_mode/log_page_test.mocks.dart
# test_data/measurements.dart
2026-04-17 12:23:56 +02:00
Roland Geider
bceae559f7
Merge branch 'master' into feature/version-2.5
2026-04-14 12:10:20 +02:00
Nsimba Tamaku
fd8545f997
fix: use unit IDs directly in Log.fromSetConfigData to prevent null on save
...
When adding an extra exercise during a workout, addExerciseAfterPage()
creates a SetConfigData with no unit objects loaded. Log.fromSetConfigData
was using the weightUnit/repetitionUnit setters which overwrite the default
IDs with null when the objects are null, causing the server to reject the
request with a ValidationError ("Repetitions unit must be present").
Fixes #1149
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-13 17:10:59 +01:00
Roland Geider
3ea4713a74
Use UUIDv7, as in the backend
2026-03-21 13:41:50 +01:00
Roland Geider
c87d3825b4
Merge branch 'master' into feature/offline-mode
...
# Conflicts:
# lib/l10n/app_en.arb
# lib/models/workouts/log.dart
# lib/models/workouts/weight_unit.dart
# lib/providers/exercises.dart
# lib/providers/gym_log_state.g.dart
# lib/providers/routines.dart
# lib/widgets/routines/forms/reps_unit.dart
# lib/widgets/routines/forms/weight_unit.dart
# lib/widgets/routines/gym_mode/log_page.dart
# macos/Flutter/GeneratedPluginRegistrant.swift
# pubspec.lock
# pubspec.yaml
# test/core/settings_test.mocks.dart
# test/core/validators_test.mocks.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/exercises/exercise_provider_db_test.dart
# test/exercises/exercises_detail_widget_test.mocks.dart
# test/routine/gym_mode/gym_mode_test.mocks.dart
# test/routine/repetition_unit_form_widget_test.dart
# test/routine/routines_provider_test.mocks.dart
# test/routine/routines_screen_test.mocks.dart
# test/routine/weight_unit_form_widget_test.dart
# test/weight/weight_provider_test.mocks.dart
# test/weight/weight_screen_test.mocks.dart
# test/widgets/routines/gym_mode/log_page_test.mocks.dart
# test_data/routines.dart
2026-03-12 14:23:11 +01:00
Roland Geider
07604ab57d
Add "warmup" to list of slot entry types
...
https://github.com/wger-project/wger/issues/2157
2026-03-02 20:18:32 +01:00
Roland Geider
54c6ce0175
Refactor the log entry form in the gym mode.
...
Previously due to rebuilds the form would e.g. not stay open after
selecting a new unit (which would also not change)
2026-02-11 13:37:33 +01:00
Roland Geider
a367678b91
Properly filter dayData entries
...
This is needed when the "needs logs to advance" toggle is active
See https://github.com/wger-project/wger/issues/2164
2026-02-09 22:49:30 +01:00
Roland Geider
f32dec2b08
Merge branch 'master' into feature/offline-mode
...
# Conflicts:
# lib/main.dart
# lib/models/workouts/log.dart
# lib/models/workouts/session.g.dart
# lib/providers/exercises.dart
# lib/providers/gym_state.g.dart
# lib/providers/wger_base_riverpod.dart
# lib/screens/dashboard.dart
# lib/screens/home_tabs_screen.dart
# lib/widgets/core/app_bar.dart
# lib/widgets/core/settings.dart
# lib/widgets/dashboard/calendar.dart
# lib/widgets/dashboard/widgets/weight.dart
# lib/widgets/routines/gym_mode/log_page.dart
# lib/widgets/routines/gym_mode/summary.dart
# lib/widgets/routines/logs/day_logs_container.dart
# lib/widgets/routines/logs/exercises_expansion_card.dart
# pubspec.lock
# pubspec.yaml
# test/core/settings_test.dart
# test/core/settings_test.mocks.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/exercises/exercise_provider_db_test.dart
# test/exercises/exercise_provider_test.dart
# test/routine/gym_mode/gym_mode_test.mocks.dart
# test/routine/routine_logs_screen_test.dart
# test/routine/routine_logs_screen_test.mocks.dart
# test/routine/routines_provider_test.mocks.dart
# test/routine/routines_screen_test.mocks.dart
# test/weight/weight_provider_test.mocks.dart
# test/weight/weight_screen_test.mocks.dart
2026-01-19 13:16:55 +01:00
Roland Geider
53dcbd8c6c
Don't mark nullable fields as "late"
...
These will be null and we avoid LateInitializationError errors
See #1079
2026-01-16 15:26:38 +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
455c9a07b1
Merge branch 'master' into feature/powersync-test
...
# Conflicts:
# lib/helpers/errors.dart
# lib/models/workouts/log.dart
# lib/models/workouts/session.dart
# lib/providers/body_weight.dart
# lib/providers/exercises.dart
# lib/providers/gym_state.g.dart
# lib/providers/routines.dart
# lib/widgets/routines/forms/day.dart
# lib/widgets/routines/forms/reps_unit.dart
# lib/widgets/routines/forms/routine.dart
# lib/widgets/routines/forms/session.dart
# lib/widgets/routines/forms/slot.dart
# lib/widgets/routines/forms/slot_entry.dart
# lib/widgets/routines/gym_mode/log_page.dart
# lib/widgets/routines/gym_mode/session_page.dart
# pubspec.lock
# test/exercises/exercise_provider_test.dart
# test/routine/forms/session_form_test.dart
# test/routine/gym_mode/session_page_test.dart
# test/routine/routine_form_test.dart
2025-12-18 12:17:56 +01:00
Roland Geider
6a2158a397
Reload the session page in the gym mode
...
This makes sure that we have the current state and don't try to create a new session
which already exists
2025-12-18 11:59:26 +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
b75ee0dece
Merge conflicts
2025-12-04 13:07:39 +01:00
Roland Geider
d8a5369519
Merge branch 'master' into feature/powersync-test
...
# Conflicts:
# integration_test/3_gym_mode.dart
# lib/database/exercises/exercise_database.g.dart
# lib/models/exercises/category.g.dart
# lib/models/exercises/exercise.g.dart
# lib/models/exercises/exercise_api.freezed.dart
# lib/models/exercises/exercise_api.g.dart
# lib/models/exercises/translation.g.dart
# lib/models/workouts/log.dart
# lib/models/workouts/log.g.dart
# lib/models/workouts/session.dart
# lib/models/workouts/session_api.dart
# lib/models/workouts/weight_unit.g.dart
# lib/providers/gym_state.dart
# lib/screens/gym_mode.dart
# lib/widgets/dashboard/calendar.dart
# lib/widgets/routines/gym_mode/gym_mode.dart
# lib/widgets/routines/gym_mode/log_page.dart
# lib/widgets/routines/gym_mode/session_page.dart
# lib/widgets/routines/log.dart
# pubspec.lock
# pubspec.yaml
# test/core/settings_test.mocks.dart
# test/core/validators_test.mocks.dart
# test/exercises/contribute_exercise_test.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/exercises/exercises_detail_widget_test.mocks.dart
# test/nutrition/nutritional_plan_screen_test.mocks.dart
# test/nutrition/nutritional_plans_screen_test.mocks.dart
# test/providers/plate_calculator_test.dart
# test/routine/forms/session_form_test.mocks.dart
# test/routine/gym_mode/gym_mode_test.mocks.dart
# test/routine/gym_mode/session_page_test.dart
# test/routine/gym_mode_screen_test.dart
# test/user/provider_test.mocks.dart
# test/weight/weight_provider_test.mocks.dart
# test/weight/weight_screen_test.mocks.dart
2025-12-04 12:48:40 +01:00
Roland Geider
06b32a2bd9
Better volume calculations, other cleanup
2025-12-04 12:14:57 +01:00
Roland Geider
aeb01a517b
Refactor widgets used in logs
...
We should try to reuse as many as possible in the end-of-gym-mode logs and in
the routine log page
2025-11-27 15:08:06 +01:00
Roland Geider
ecd0b6c6b4
Add overview page when a workout has been completed
2025-11-26 20:17:02 +01:00
Roland Geider
eedc249cea
Merge branch 'master' into feature/powersync-test
...
# Conflicts:
# lib/models/body_weight/weight_entry.dart
# lib/models/body_weight/weight_entry.g.dart
# lib/models/workouts/log.dart
# lib/models/workouts/log.g.dart
# lib/models/workouts/session.g.dart
# pubspec.lock
# pubspec.yaml
# test/exercises/contribute_exercise_image_test.mocks.dart
# test/exercises/contribute_exercise_test.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/nutrition/nutritional_meal_form_test.mocks.dart
# test/nutrition/nutritional_plan_form_test.mocks.dart
# test/weight/weight_model_test.dart
# test/weight/weight_provider_test.dart
# test_data/body_weight.dart
2025-11-25 21:23:22 +01:00
Roland Geider
9f66815e10
Merge branch 'master' into feature/gym-mode
...
# Conflicts:
# lib/widgets/routines/gym_mode/navigation.dart
# pubspec.lock
# test/exercises/contribute_exercise_image_test.mocks.dart
# test/exercises/contribute_exercise_test.mocks.dart
# test/nutrition/nutritional_meal_form_test.mocks.dart
# test/nutrition/nutritional_plan_form_test.mocks.dart
2025-11-19 19:18:45 +01:00
Roland Geider
fc881c4929
Properly handle timezones
...
This should (hopefully 🤞 ) take care of problems saving entries with timezone
information.
2025-11-18 16:30:52 +01:00
Roland Geider
c26e3828f8
Allow adding additional exercises to the workout
...
While these are not real ad-hoc workouts, at least it's a first step
2025-11-15 23:44:42 +01:00
Roland Geider
f1f37d3e03
Allow swapping exercises in the gym mode
2025-11-15 01:32:59 +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
49873d20bd
Cleanup some of the models
2025-11-08 23:07:40 +01:00
Roland Geider
2132249682
Wrap the routines provider
...
This makes it easier to load the data from the powersync database
2025-11-07 15:10:04 +01:00
Roland Geider
72deeda4f7
Update session and log models
2025-11-04 16:15:37 +01:00
Roland Geider
9040106939
Rework the base data providers, fix some tests
2025-11-03 15:40:37 +01:00