Skip to content

Commit d31b09d

Browse files
committed
Make behaviour of cards more consistent
Now the nutrition card has the "go to detail page" on the left and the action icon on the right as well
1 parent 003038e commit d31b09d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/widgets/dashboard/widgets.dart

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,17 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
206206
mainAxisAlignment: MainAxisAlignment.spaceBetween,
207207
children: <Widget>[
208208
TextButton(
209-
child: Text(AppLocalizations.of(context).logIngredient),
209+
child: Text(AppLocalizations.of(context).goToDetailPage),
210+
onPressed: () {
211+
Navigator.of(context)
212+
.pushNamed(NutritionalPlanScreen.routeName, arguments: _plan);
213+
},
214+
),
215+
IconButton(
216+
icon: const Icon(
217+
Icons.history_edu,
218+
),
219+
tooltip: AppLocalizations.of(context).logIngredient,
210220
onPressed: () {
211221
Navigator.pushNamed(
212222
context,
@@ -219,13 +229,6 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
219229
);
220230
},
221231
),
222-
TextButton(
223-
child: Text(AppLocalizations.of(context).goToDetailPage),
224-
onPressed: () {
225-
Navigator.of(context)
226-
.pushNamed(NutritionalPlanScreen.routeName, arguments: _plan);
227-
},
228-
),
229232
],
230233
),
231234
],

0 commit comments

Comments
 (0)