feat:更新日程页面主题色
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user