diff --git a/lib/controller.dart b/lib/controller.dart index 197ac7b..910ce1a 100644 --- a/lib/controller.dart +++ b/lib/controller.dart @@ -502,6 +502,8 @@ class CalendarController { monthList.clear(); weekList.clear(); calendarProvider.clearData(); + calendarConfiguration.weekChangeListeners=null; + calendarConfiguration.monthChangeListeners=null; } } diff --git a/lib/widget/calendar_view.dart b/lib/widget/calendar_view.dart index 6227a64..bb016a9 100644 --- a/lib/widget/calendar_view.dart +++ b/lib/widget/calendar_view.dart @@ -69,7 +69,7 @@ class _CalendarViewWidgetState extends State { @override void dispose() { - widget.calendarController.clearData(); +// widget.calendarController.clearData(); super.dispose(); } diff --git a/lib/widget/month_view.dart b/lib/widget/month_view.dart index 08815ed..bdbafd7 100644 --- a/lib/widget/month_view.dart +++ b/lib/widget/month_view.dart @@ -162,12 +162,13 @@ class ItemContainerState extends State { dateModel = widget.dateModel; isSelected = ValueNotifier(dateModel.isSelected); - WidgetsBinding.instance.addPostFrameCallback((callback) { - if (configuration.selectMode == CalendarConstants.MODE_SINGLE_SELECT && - dateModel.isSelected) { - calendarProvider.lastClickItemState = this; - } - }); +// 先注释掉这段代码 +// WidgetsBinding.instance.addPostFrameCallback((callback) { +// if (configuration.selectMode == CalendarConstants.MODE_SINGLE_SELECT && +// dateModel.isSelected) { +// calendarProvider.lastClickItemState = this; +// } +// }); } /**