forked from eatvio/eatvio_app
fixed profile, recipeis and diets
This commit is contained in:
@@ -454,7 +454,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return _dayOfPlan(widget.diet.dailySchedule[index], index, s);
|
||||
return _dayOfPlan(widget.diet.dailySchedule[index + 1] ?? {}, index, s);
|
||||
},
|
||||
itemCount: widget.diet.dailySchedule.length,
|
||||
),
|
||||
@@ -500,7 +500,7 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_dayOfPlan(List<List<DailySchedule>> day, int dayNumber, S s) {
|
||||
_dayOfPlan(Map<int, Map<int, DailySchedule>> day, int dayNumber, S s) {
|
||||
_choiceChipWidget(int index) {
|
||||
return ChoiceChip(
|
||||
selectedColor: appTheme.blueA400,
|
||||
@@ -568,8 +568,8 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) => _daily(day[widget.selectedIndexes[dayNumber]][index], s),
|
||||
itemCount: day[widget.selectedIndexes[dayNumber]].length,
|
||||
itemBuilder: (context, index) => _daily(day[widget.selectedIndexes[dayNumber] + 1]?[index + 1], s),
|
||||
itemCount: day[widget.selectedIndexes[dayNumber] + 1]?.length ?? 0,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
@@ -587,7 +587,8 @@ class _AboutDietScreenState extends State<AboutDietScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
_daily(DailySchedule daily, S s) {
|
||||
_daily(DailySchedule? daily, S s) {
|
||||
if (daily == null) return const SizedBox();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
child: Row(
|
||||
|
||||
Reference in New Issue
Block a user