forked from eatvio/eatvio_app
fixed profile, recipeis and diets
This commit is contained in:
@@ -35,7 +35,7 @@ class _DayWidgetState extends State<DayWidget> {
|
||||
return BlocBuilder<CreateDietCubit, CreateDietState>(
|
||||
builder: (context, state) {
|
||||
return MainBackgroundBouble(
|
||||
hasError: state.dailyScheduleErrors[widget.index].where((element) => element.isNotEmpty).isNotEmpty,
|
||||
hasError: state.dailyScheduleErrors[widget.index].isNotEmpty,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -216,16 +216,15 @@ class _DayWidgetState extends State<DayWidget> {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (state.dailyScheduleErrors[widget.index][_selectedMealIndex].isNotEmpty) ...[
|
||||
if (state.dailyScheduleErrors[widget.index].isNotEmpty) ...[
|
||||
SizedBox(height: 12),
|
||||
CustomErrorWidget(error: state.dailyScheduleErrors[widget.index][_selectedMealIndex]),
|
||||
CustomErrorWidget(error: state.dailyScheduleErrors[widget.index]),
|
||||
],
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
BlocBuilder<CreateDietCubit, CreateDietState>(
|
||||
buildWhen: (previous, current) => previous.dietData.dailySchedule != current.dietData.dailySchedule,
|
||||
builder: (context, state) {
|
||||
if (state.dietData.dailySchedule != null) {
|
||||
final day = state.dietData.dailySchedule?[widget.index];
|
||||
|
||||
Reference in New Issue
Block a user