mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-06 15:54:31 +01:00
fixes
This commit is contained in:
1 parent
1ae3eafd72
commit
2347657dcd
2 files changed
+5
No files matched your search
@@ -118,6 +118,10 @@ class NutritionalPlan {
|
||||
carbohydrates: goalCarbohydrates?.toDouble(),
|
||||
);
|
||||
}
|
||||
// if there are no set goals and no defined meals, the goals are still undefined
|
||||
if (meals.isEmpty) {
|
||||
return NutritionalGoals();
|
||||
}
|
||||
// otherwise, add up all the nutritional values of the meals and use that as goals
|
||||
final sumValues = meals.fold(NutritionalValues(), (a, b) => a + b.plannedNutritionalValues);
|
||||
return NutritionalGoals(
|
||||
|
||||
@@ -625,6 +625,7 @@ class NothingFound extends StatelessWidget {
|
||||
FormScreen.routeName,
|
||||
arguments: FormScreenArguments(
|
||||
_titleForm,
|
||||
hasListView: true,
|
||||
_form,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user