Commit Graph

176 Commits

Author SHA1 Message Date
Roland Geider
6a19a0697e Merge pull request #105 from sandimilohanic/master
add reference from log to meal
2021-10-23 15:44:52 +02:00
Sandi Milohanić
364b37c106 Correction reference mealId in log 2021-10-23 07:37:14 +02:00
AxelBlaz3
8228b42bb2 Merge branch 'master' of https://github.com/AxelBlaz3/flutter 2021-10-14 09:08:54 +05:30
AxelBlaz3
1b92b073ca Display errors in login page
Now the app shows the reason why the login failed to the user.

Why this happened?
There's a 'Consumer' at the top most widget (MaterialApp) which gets rebuild everytime during logout and login. We don't need to notify listeners and rebuild the MaterialApp widget when logging out (cleaning up old data) during login. By doing so, context is in place and dialog appears. If the whole MaterialApp rebuilds, the old context is gone and a new context is given to all the widgets, which is where the issue arises and the dialog uses old context (which doens't exist in the first place).

Signed-off-by: AxelBlaz3 <karthikgaddam4@gmail.com>
2021-10-14 08:51:18 +05:30
Roland Geider
4ad5263834 Merge branch 'better-linting-rules-1' 2021-10-13 17:45:59 +02:00
Roland Geider
188158e5d6 Merge branch 'sandimilohanic_master' 2021-10-13 17:40:46 +02:00
Sandi Milohanić
ee3df1bada #29 - Add minimum required server version 2021-10-12 18:43:45 +02:00
Roland Geider
ca4e902e07 Merge branch 'master' into better-linting-rules-1 2021-10-12 15:11:43 +02:00
Marvin M
2fb9737901 camel_case_types
statics can't be private
2021-10-08 15:28:19 +02:00
Marvin M
1e8080cc02 always_declare_return_types 2021-10-07 20:43:55 +02:00
Marvin M
9d479e89b0 const_constructors
info: Prefer const with constant constructors. prefer_const_constructors
2021-10-07 20:40:09 +02:00
Marko Milosevic
48063634cc Fixed 100 characters limit in code 2021-10-07 19:58:57 +02:00
Marko Milosevic
91ebe6ce04 Removed the hardcoded options for autologin 2021-10-07 19:40:19 +02:00
Marko Milosevic
88f1f200b1 Added the option to delete workout log entries 2021-10-07 19:37:16 +02:00
Marvin M
eae34f0b36 Fixes pt 2 2021-10-01 17:32:31 +02:00
Marvin M
45a2a5f857 Fixes pt 1 2021-10-01 17:18:17 +02:00
Roland Geider
8543652581 Merge branch 'master' into feature/measurements
# Conflicts:
#	lib/screens/dashboard.dart
#	test/base_provider_test.mocks.dart
#	test/gallery_screen_test.mocks.dart
#	test/nutritional_plan_form_test.mocks.dart
#	test/workout_form_test.mocks.dart
#	test/workout_set_form_test.mocks.dart
2021-09-07 17:03:15 +02:00
Roland Geider
c704f561db Show entries graph in the category overview 2021-09-06 18:08:07 +02:00
Roland Geider
606a73a114 Load all measurement data upfront 2021-09-06 17:40:26 +02:00
Roland Geider
65129f000a Fix type error that prevented an image from being edited 2021-09-01 15:46:54 +02:00
Roland Geider
c8d1d1ad84 Replace getImage with pickImage, was deprecated 2021-09-01 15:46:31 +02:00
Roland Geider
b2195d4f55 Allow deleting and editing entries 2021-08-29 22:34:30 +02:00
Roland Geider
dc22f236ef Allow adding measurement categories and entries 2021-08-28 21:52:06 +02:00
ton-An
0b0da1405b Changed MeasurementEntry's value string to number
Reflects the changes made to the rest api. MeasurementEntry's value is
a number instead of a string when in json format
2021-08-26 15:40:26 +02:00
ton-An
89e0060ff5 (MeasurementProvider) Fixed error handling
MeasurementProvider
(Edited)
- Fixed error handling
- implemented findEntryById and findCategoryById

MeasurementCategory
(Added)
- findEntryById()
2021-08-26 14:41:26 +02:00
Roland Geider
6cbe164ec8 Merge remote-tracking branch 'origin/feature/measurements' into feature/measurements
# Conflicts:
#	lib/models/measurements/measurement_entry.g.dart
2021-08-25 21:34:22 +02:00
Roland Geider
a2673fe764 Merge branch 'master' into feature/measurements
# Conflicts:
#	pubspec.lock
2021-08-25 16:52:15 +02:00
ton-An
755cdd5fae Pretty much finished the MeasurementProvider
-- MesurementProvider --
(Added)
- editCategory
- editEntry

-- MeasurementEntry --
(Added)
- copyWith

-- MeasurementCategory --
(Added)
- copyWith
2021-08-25 16:24:29 +02:00
ton-An
23a8226e72 Worked on the MeasurementProvider
(Added)
- addCategory()
- deleteCategory()
- addEntry()
- deleteEntry()
2021-08-25 14:43:53 +02:00
ton-An
19445c36a2 (Measurements) Added Equatable + Refactored
(MeasurementProvider)
- Passing in the WgerBaseProvider instead of extending with it
- Re-written tests
- Added the fixture reader to make test file less crowded

(Measurement Models)
- Added Equatable
- Re-written tests
2021-08-22 18:07:47 +02:00
Roland Geider
e8c5b09c5a Actually delete the logs from the server... 2021-08-16 19:07:49 +02:00
Roland Geider
d35e46514e Allow deleting nutritional diary entries 2021-08-16 18:50:30 +02:00
Roland Geider
c00a755f0d Reset the plan's logs when loading new ones 2021-08-16 18:05:12 +02:00
Roland Geider
d01986238f Show percent of energy and g per body-kg for macros 2021-08-16 16:24:12 +02:00
Roland Geider
de84c24e72 Don't use the canonical form endpoint
This was removed on the server
2021-08-11 13:28:37 +02:00
Roland Geider
0639c29b3c Don't use the canonical form endpoint
This was removed on the server
2021-07-24 21:55:55 +02:00
Roland Geider
be409333d6 Add measurement provider 2021-07-24 21:27:21 +02:00
Roland Geider
2ce9a8c8f3 Don't load category ID
The info endpoint returns the category object
2021-07-08 18:21:43 +02:00
Arun Muralidharan
7eb26da243 Reorder Sets
Now updates order upon deletion as well. Order will be set to length of sets upon adding a new one.
2021-06-28 21:56:25 +02:00
Arun Muralidharan
22993a0151 Reorder List
Change in order now reflects in DB as well.
2021-06-28 14:59:43 +02:00
Github-actions
c877e436b0 Automatic linting 2021-06-22 21:10:15 +00:00
Github-actions
7492b53c67 Automatic linting 2021-06-20 13:09:24 +00:00
Roland Geider
d0ec542801 Add methods to allow editing a workout day 2021-05-24 11:58:54 +02:00
Roland Geider
31edbb3b48 Loop through all result pages when loading logs 2021-05-19 22:34:36 +02:00
Roland Geider
1ea13bb649 Reset the log list when loading the plan
Otherwise every time the user opens a workout, the logs will get added again and
again to the list
2021-05-18 22:14:58 +02:00
Roland Geider
b59e30b220 Send app information in the user agent when making requests 2021-05-17 20:06:46 +02:00
Roland Geider
26fc59974d Fetch exercises from server if they are not known locally
This fixes a bug where the workout would not load when an exercise was added to
the database after the exercises were cached locally.
2021-05-17 12:41:19 +02:00
Roland Geider
642b0b8658 No need to fetch all nutritional diary logs on the dashboard
This happens when loading the full plan anyway
2021-05-13 14:10:14 +02:00
Roland Geider
eb3214ab2f Further reduce the number of requests needed to load the plans sparsely 2021-05-13 13:56:16 +02:00
Roland Geider
2468e600c6 Fetch nutritional plan details when visiting the detail page
This helps reduce the data loaded when loading the app the first time

See #14
2021-05-13 13:35:16 +02:00