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

View File

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