@@ -47,90 +47,82 @@ class DayInfoWidget extends StatelessWidget {
47
47
style: Theme .of (context).textTheme.headlineSmall),
48
48
),
49
49
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 (
55
55
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),
74
81
),
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
+ ),
133
83
),
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
+ )
134
126
],
135
127
);
136
128
}
0 commit comments