werner-scholtz / kalender

An elegantly crafted Flutter calendar UI package.
MIT License
107 stars 29 forks source link

is there a way to detect page changes and receive the date or page number as callback? #54

Closed Shui-Be closed 7 months ago

Shui-Be commented 7 months ago

Hi!

wondering if it's possible to receive a callback with either date or the changed page number for when page changes on swiping left/right on the calendar.

for instance, when a user swiped on a day view or week view, i'd like to make a network call to fetch the new events from backend with the swiped date and populate the new events in the calendar grid.

or if that's not possible, is there a way to disable the swiping behavior for day view / week view etc, (not sure if disabling swipe will affect the calendarController.jumpToDate(date); and calendarController.animateToDateTime(date); since it uses the scrolling controller.

Shui-Be commented 7 months ago

i just realized that there's a onPageChanged already in eventHandlers, my bad. closing this.