Skip to content

Commit 7c557f9

Browse files
authored
Merge pull request #48 from simonoppowa/develop
Develop
2 parents 161977a + 1c9b9e8 commit 7c557f9

File tree

2 files changed

+74
-82
lines changed

2 files changed

+74
-82
lines changed

lib/features/diary/presentation/widgets/day_info_widget.dart

Lines changed: 73 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -47,90 +47,82 @@ class DayInfoWidget extends StatelessWidget {
4747
style: Theme.of(context).textTheme.headlineSmall),
4848
),
4949
const SizedBox(height: 8.0),
50-
trackedDay != null
51-
? Column(
52-
crossAxisAlignment: CrossAxisAlignment.start,
53-
children: [
54-
Padding(
50+
Column(
51+
crossAxisAlignment: CrossAxisAlignment.start,
52+
children: [
53+
trackedDay == null
54+
? Padding(
5555
padding: const EdgeInsets.symmetric(horizontal: 16.0),
56-
child: Card(
57-
elevation: 0.0,
58-
margin: const EdgeInsets.all(0.0),
59-
color: trackedDayEntity?.getRatingDayTextBackgroundColor(context),
60-
child: Padding(
61-
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8.0),
62-
child: Text(
63-
_getCaloriesTrackedDisplayString(trackedDay),
64-
style: Theme.of(context)
65-
.textTheme
66-
.titleLarge
67-
?.copyWith(
68-
color:
69-
trackedDayEntity?.getRatingDayTextColor(context),
70-
fontWeight: FontWeight.bold),
71-
),
72-
),
73-
),
56+
child: Text(S.of(context).nothingAddedLabel,
57+
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
58+
color: Theme.of(context)
59+
.colorScheme
60+
.onBackground
61+
.withOpacity(0.7))),
62+
)
63+
: const SizedBox(),
64+
Padding(
65+
padding: const EdgeInsets.symmetric(horizontal: 16.0),
66+
child: Card(
67+
elevation: 0.0,
68+
margin: const EdgeInsets.all(0.0),
69+
color:
70+
trackedDayEntity?.getRatingDayTextBackgroundColor(context),
71+
child: Padding(
72+
padding: const EdgeInsets.symmetric(
73+
horizontal: 8.0, vertical: 8.0),
74+
child: Text(
75+
trackedDay != null
76+
? _getCaloriesTrackedDisplayString(trackedDay)
77+
: "",
78+
style: Theme.of(context).textTheme.titleLarge?.copyWith(
79+
color: trackedDayEntity?.getRatingDayTextColor(context),
80+
fontWeight: FontWeight.bold),
7481
),
75-
const SizedBox(height: 8.0),
76-
userActivities.isNotEmpty
77-
? ActivityVerticalList(
78-
day: selectedDay,
79-
title: S.of(context).activityLabel,
80-
userActivityList: userActivities,
81-
onItemLongPressedCallback: onActivityItemLongPressed)
82-
: const SizedBox(),
83-
breakfastIntake.isNotEmpty
84-
? IntakeVerticalList(
85-
day: selectedDay,
86-
title: S.of(context).breakfastLabel,
87-
listIcon: Icons.bakery_dining_outlined,
88-
addMealType: AddMealType.breakfastType,
89-
intakeList: breakfastIntake,
90-
onItemLongPressedCallback: onIntakeItemLongPressed,
91-
)
92-
: const SizedBox(),
93-
lunchIntake.isNotEmpty
94-
? IntakeVerticalList(
95-
day: selectedDay,
96-
title: S.of(context).lunchLabel,
97-
listIcon: Icons.lunch_dining_outlined,
98-
addMealType: AddMealType.lunchType,
99-
intakeList: lunchIntake,
100-
onItemLongPressedCallback: onIntakeItemLongPressed,
101-
)
102-
: const SizedBox(),
103-
dinnerIntake.isNotEmpty
104-
? IntakeVerticalList(
105-
day: selectedDay,
106-
title: S.of(context).dinnerLabel,
107-
listIcon: Icons.dinner_dining_outlined,
108-
addMealType: AddMealType.dinnerType,
109-
intakeList: dinnerIntake,
110-
onItemLongPressedCallback: onIntakeItemLongPressed,
111-
)
112-
: const SizedBox(),
113-
snackIntake.isNotEmpty
114-
? IntakeVerticalList(
115-
day: selectedDay,
116-
title: S.of(context).snackLabel,
117-
listIcon: CustomIcons.food_apple_outline,
118-
addMealType: AddMealType.snackType,
119-
intakeList: snackIntake,
120-
onItemLongPressedCallback: onIntakeItemLongPressed,
121-
)
122-
: const SizedBox()
123-
],
124-
)
125-
: Padding(
126-
padding: const EdgeInsets.symmetric(horizontal: 16.0),
127-
child: Text(S.of(context).nothingAddedLabel,
128-
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
129-
color: Theme.of(context)
130-
.colorScheme
131-
.onBackground
132-
.withOpacity(0.7))),
82+
),
13383
),
84+
),
85+
const SizedBox(height: 8.0),
86+
ActivityVerticalList(
87+
day: selectedDay,
88+
title: S.of(context).activityLabel,
89+
userActivityList: userActivities,
90+
onItemLongPressedCallback: onActivityItemLongPressed),
91+
IntakeVerticalList(
92+
day: selectedDay,
93+
title: S.of(context).breakfastLabel,
94+
listIcon: Icons.bakery_dining_outlined,
95+
addMealType: AddMealType.breakfastType,
96+
intakeList: breakfastIntake,
97+
onItemLongPressedCallback: onIntakeItemLongPressed,
98+
),
99+
IntakeVerticalList(
100+
day: selectedDay,
101+
title: S.of(context).lunchLabel,
102+
listIcon: Icons.lunch_dining_outlined,
103+
addMealType: AddMealType.lunchType,
104+
intakeList: lunchIntake,
105+
onItemLongPressedCallback: onIntakeItemLongPressed,
106+
),
107+
IntakeVerticalList(
108+
day: selectedDay,
109+
title: S.of(context).dinnerLabel,
110+
listIcon: Icons.dinner_dining_outlined,
111+
addMealType: AddMealType.dinnerType,
112+
intakeList: dinnerIntake,
113+
onItemLongPressedCallback: onIntakeItemLongPressed,
114+
),
115+
IntakeVerticalList(
116+
day: selectedDay,
117+
title: S.of(context).snackLabel,
118+
listIcon: CustomIcons.food_apple_outline,
119+
addMealType: AddMealType.snackType,
120+
intakeList: snackIntake,
121+
onItemLongPressedCallback: onIntakeItemLongPressed,
122+
),
123+
const SizedBox(height: 16.0)
124+
],
125+
)
134126
],
135127
);
136128
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1515
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
1616
# Read more about iOS versioning at
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18-
version: 0.6.8+14
18+
version: 0.6.10+16
1919

2020
environment:
2121
sdk: '>=3.0.0 <3.4.0'

0 commit comments

Comments
 (0)