feat:增加统计图表模块

This commit is contained in:
2025-11-14 11:41:05 +08:00
parent e384db7845
commit 49ecfb2e5e
10 changed files with 621 additions and 26 deletions

View File

@@ -54,8 +54,8 @@ class CalendarPageState extends State<CalendarPage> {
void _showDialog(bool isEditing, Calendar? calendar) {
final provider = Provider.of<CalendarProvider>(context, listen: false);
if (isEditing) {
provider.initForm(calendar!);
if (calendar != null) {
provider.initForm(calendar);
} else {
provider.resetForm();
}
@@ -153,7 +153,7 @@ class CalendarPageState extends State<CalendarPage> {
dataSource: AppointmentDataSource(_appointments),
onAdd: () {
if (_calendarController.view == CalendarView.week) {
_showDialog(true, provider.formItem);
_showDialog(false, provider.formItem);
}
},
onEdit: (appointment) {