File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,6 @@ class IngredientFormState extends State<IngredientForm> {
367
367
) {
368
368
if (snapshot.hasData) {
369
369
_mealItem.ingredient = snapshot.data! ;
370
- // here it could be nice to put the button to the popup
371
370
return MealItemValuesTile (
372
371
ingredient: _mealItem.ingredient,
373
372
nutritionalValues: _mealItem.nutritionalValues,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import 'package:wger/widgets/nutrition/nutrition_tile.dart';
13
13
import 'package:wger/widgets/nutrition/widgets.dart' ;
14
14
15
15
/// a NutritionTitle showing an ingredient, with its
16
- /// avatar and nutritional values
16
+ /// avatar, nutritional values and button to popup its details
17
17
class MealItemValuesTile extends StatelessWidget {
18
18
final Ingredient ingredient;
19
19
final NutritionalValues nutritionalValues;
@@ -29,6 +29,16 @@ class MealItemValuesTile extends StatelessWidget {
29
29
return NutritionTile (
30
30
leading: IngredientAvatar (ingredient: ingredient),
31
31
title: Text (getShortNutritionValues (nutritionalValues, context)),
32
+ trailing: IconButton (
33
+ icon: const Icon (Icons .info_outline),
34
+ onPressed: () {
35
+ showIngredientDetails (
36
+ context,
37
+ ingredient.id,
38
+ image: ingredient.image? .image,
39
+ );
40
+ },
41
+ ),
32
42
);
33
43
}
34
44
}
You can’t perform that action at this time.
0 commit comments