mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-19 07:50:52 +01:00
hide 'add meal' button when in only logging mode
This commit is contained in:
@@ -57,22 +57,23 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
_nutritionalPlan.pseudoMealOthers('Other logs'),
|
||||
_nutritionalPlan.allMealItems,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context).addMeal),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
FormScreen.routeName,
|
||||
arguments: FormScreenArguments(
|
||||
AppLocalizations.of(context).addMeal,
|
||||
MealForm(_nutritionalPlan.id!),
|
||||
),
|
||||
);
|
||||
},
|
||||
if (!_nutritionalPlan.onlyLogging)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context).addMeal),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
FormScreen.routeName,
|
||||
arguments: FormScreenArguments(
|
||||
AppLocalizations.of(context).addMeal,
|
||||
MealForm(_nutritionalPlan.id!),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
height: 220,
|
||||
|
||||
Reference in New Issue
Block a user