feat:更新日程页面主题色

This commit is contained in:
2025-11-13 16:45:13 +08:00
parent 427e9f0a48
commit e384db7845
2 changed files with 10 additions and 3 deletions

View File

@@ -30,8 +30,8 @@ class CalendarPageState extends State<CalendarPage> {
}
@override
void initState() {
super.initState();
void didChangeDependencies() {
super.didChangeDependencies();
refreshAppointments();
}
@@ -45,7 +45,7 @@ class CalendarPageState extends State<CalendarPage> {
startTime: calendar.startTime!,
endTime: calendar.endTime!,
subject: calendar.title,
color: Colors.blue,
color: Theme.of(context).colorScheme.primary,
),
)
.toList();

View File

@@ -65,12 +65,19 @@ Widget buildCalendar({
firstDayOfWeek: 1,
showDatePickerButton: true,
showNavigationArrow: true,
showTodayButton: true,
allowViewNavigation: true,
// 月份视图设置
monthViewSettings: MonthViewSettings(
appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
showAgenda: true,
),
scheduleViewSettings: ScheduleViewSettings(
monthHeaderSettings: MonthHeaderSettings(
backgroundColor: Theme.of(context).colorScheme.primary,
height: 85
)
),
// 时间区域设置
timeSlotViewSettings: TimeSlotViewSettings(
startHour: 7,