feat:增加统计图表模块
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user