I tried using my own custom header in 1-day view of calendar but the onViewChanged causes appointments to hide and when I comment the onViewChanged code , appointments re-appears but the onChange functionality doesn't work.
https://drive.google.com/file/d/1oDm7gTxb4cgKIOGl4pWKOwozzpqHejcE/view?usp=sharing
Please finds the attached project containing syncfusion calendar widget in flutter. i reproduced the issue.
|
onViewChanged: (details) {
if (nextDay ==
_controller.displayDate!.add(Duration(days: 1)) &&
prevDay ==
_controller.displayDate!.add(Duration(days: -1))) {
return;
}
SchedulerBinding.instance!.addPostFrameCallback((duration) {
setState(() {
nextDay = _controller.displayDate!.add(Duration(days: 1));
prevDay = _controller.displayDate!.add(Duration(days: -1));
filterSlots(prevDay, _controller.displayDate!, nextDay);
});
});
} |