Skip to content

Commit a701207

Browse files
committed
improve design
1 parent 90ebeec commit a701207

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

lib/widgets/nutrition/meal.dart

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,24 @@ class MealHeader extends StatelessWidget {
318318
crossAxisAlignment: CrossAxisAlignment.start,
319319
children: [
320320
Text(
321-
((_meal.time != null) ? '${_meal.time!.format(context)} ' : '') + _meal.name,
322-
style: Theme.of(context).textTheme.titleMedium,
321+
_meal.name,
322+
style: Theme.of(context).textTheme.titleLarge,
323323
),
324-
Text(
325-
_meal.isRealMeal
326-
? getKcalConsumedVsPlanned(_meal, context)
327-
: getKcalConsumed(_meal, context),
328-
style: Theme.of(context).textTheme.titleSmall,
324+
Row(
325+
children: [
326+
if (_meal.time != null)
327+
Text(
328+
_meal.time!.format(context),
329+
style: Theme.of(context).textTheme.titleSmall,
330+
),
331+
if (_meal.time != null) const SizedBox(width: 12),
332+
Text(
333+
_meal.isRealMeal
334+
? getKcalConsumedVsPlanned(_meal, context)
335+
: getKcalConsumed(_meal, context),
336+
style: Theme.of(context).textTheme.titleSmall,
337+
),
338+
],
329339
),
330340
],
331341
)),
1.63 KB
Loading
2.88 KB
Loading
1.65 KB
Loading

0 commit comments

Comments
 (0)