You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the package was reworked, the DateController no longer has currentlyVisibleDates. I couldn't find any clean way to find what the dates are, and resorted to looking at the pages manually. I think it would be nice to have this functionality back. (Also, for the record, the documentation still states that you can use DateController to check the currently visible dates)
My use-case is that I'd like to show a toast when the user presses the "Show today" button when they're already on the current week. Before the update, the condition was simply _controller.currentlyVisibleDates.contains(LocalDate.today()). After the update, I did the following:
boolshowingCurrentWeek() {
final todayPage =DateTime.now().toUtc().atStartOfDay.datePage;
final currentPage = _dateController.value.page;
final visibleDayCount = _dateController.visibleRange.visibleDayCount;
return currentPage <= todayPage &&
todayPage <= currentPage + visibleDayCount -1;
}
The text was updated successfully, but these errors were encountered:
As part of v1.0.0-alpha.7, there are now dateController.visibleDates , datePageValue.visibleDates, .firstVisibleDate, .firstVisiblePage,.lastVisibleDate, and .lastVisiblePage
After the package was reworked, the
DateController
no longer hascurrentlyVisibleDates
. I couldn't find any clean way to find what the dates are, and resorted to looking at the pages manually. I think it would be nice to have this functionality back. (Also, for the record, the documentation still states that you can useDateController
to check the currently visible dates)My use-case is that I'd like to show a toast when the user presses the "Show today" button when they're already on the current week. Before the update, the condition was simply
_controller.currentlyVisibleDates.contains(LocalDate.today())
. After the update, I did the following:The text was updated successfully, but these errors were encountered: