颤振日历。如何加入相似的日期?

时间:2020-06-29 16:35:07

标签: flutter dart

我正在为现有后端(Node JS)构建学校管理移动应用程序。目前,我不得不在日历中显示学生的时间表,这让我感到困惑。有现成的API,因此当我向日程表列表请求时,会得到以下信息:

I/flutter ( 2841): [{schedule_id: 6213, group_id: 5, subject_id: 3, start_time: 2020-06-29 11:35, end_time: 2020-06-29 12:20, room: 23, subject_color: #1976D2, subject_title: Chuvstva Rodini 6, teacher_id: 7, teacher_name: John, teacher_lastname: Doe, teacher_email: johndoe@gmail.com, teacher_password: $2a$10$ls10WLnltbehQinbK/Olk.NuHH1CNnPUy5yc64y.B8j9wGBADkTkW, teacher_phone: +998958965623, teacher_address: Nalog 12}, {schedule_id: 6212, group_id: 5, subject_id: 3, start_time: 2020-06-22 11:35, end_time: 2020-06-22 12:20, room: 23, subject_color: #1976D2, subject_title: Chuvstva Rodini 6, teacher_id: 7, teacher_name: John, teacher_lastname: Doe, teacher_email: johndoe@gmail.com, teacher_password: $2a$10$ls10WLnltbehQinbK/Olk.NuHH1CNnPUy5yc64y.B8j9wGBADkTkW, teacher_phone: +998958965623, teacher_address: Nalog 12}, {schedule_id: 6211, group_id: 5, subject_id: 3, start_time: 2020-06-15 11:35, end_time: 2020-06-15 12:20, room: 23, subject_color: #1976D2, subject_title: Chuvstva Rodini 6, teacher_id: 7, teacher_n

我原本希望获得DateTimeList<Event>,但是我得到DateTimeEvent,其中日程表具有自己的ID。

Flutter Calendar Api要求事件应类似于Map<DateTime, List<dynamic>>

是否有办法将相似的日期作为一个日期加入,并分别创建该日的事件列表?

0 个答案:

没有答案