Skip to content

Commit bd5f6d6

Browse files
committed
Fix calendar screen merge conflict
1 parent d1f68bc commit bd5f6d6

1 file changed

Lines changed: 54 additions & 26 deletions

File tree

lib/presentation/calendar/screens/calendar_screen.dart

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -300,32 +300,60 @@ class _CalendarScreenState extends State<CalendarScreen> {
300300
],
301301
),
302302
);
303-
},
304-
onDeleted: () {
305-
showTwoButtonDeleteDialog(
306-
context,
307-
title: AppLocalizations.of(context)!
308-
.scheduleDeleteConfirmTitle,
309-
description: AppLocalizations.of(context)!
310-
.scheduleDeleteConfirmDescription,
311-
cancelText: AppLocalizations.of(context)!.cancel,
312-
confirmText: AppLocalizations.of(context)!
313-
.deleteScheduleConfirmAction,
314-
).then((confirmed) {
315-
if (confirmed != true || !context.mounted) {
316-
return;
317-
}
318-
context.read<MonthlySchedulesBloc>().add(
319-
MonthlySchedulesScheduleDeleted(
320-
schedule: schedule),
321-
);
322-
});
323-
},
324-
);
325-
},
326-
),
327-
);
328-
},
303+
}
304+
305+
return Expanded(
306+
child: ListView.builder(
307+
itemCount:
308+
state.schedules[_selectedDate]?.length ?? 0,
309+
itemBuilder: (context, index) {
310+
final schedule =
311+
state.schedules[_selectedDate]![index];
312+
313+
return ScheduleDetail(
314+
schedule: schedule,
315+
onEdit: () {
316+
showModalBottomSheet(
317+
context: context,
318+
isScrollControlled: true,
319+
backgroundColor: Colors.transparent,
320+
builder: (context) => ScheduleEditScreen(
321+
scheduleId: schedule.id,
322+
),
323+
);
324+
},
325+
onDeleted: () {
326+
showTwoButtonDeleteDialog(
327+
context,
328+
title: AppLocalizations.of(context)!
329+
.scheduleDeleteConfirmTitle,
330+
description: AppLocalizations.of(context)!
331+
.scheduleDeleteConfirmDescription,
332+
cancelText:
333+
AppLocalizations.of(context)!.cancel,
334+
confirmText: AppLocalizations.of(context)!
335+
.deleteScheduleConfirmAction,
336+
).then((confirmed) {
337+
if (confirmed != true ||
338+
!context.mounted) {
339+
return;
340+
}
341+
context.read<MonthlySchedulesBloc>().add(
342+
MonthlySchedulesScheduleDeleted(
343+
schedule: schedule,
344+
),
345+
);
346+
});
347+
},
348+
);
349+
},
350+
),
351+
);
352+
},
353+
),
354+
],
355+
),
356+
),
329357
),
330358
],
331359
),

0 commit comments

Comments
 (0)