SimformSolutionsPvtLtd / flutter_calendar_view

A Flutter package allows you to easily implement all calendar UI and calendar event functionality. 👌🔝🎉
https://pub.dev/packages/calendar_view
MIT License
435 stars 259 forks source link

Changing startHour and endHour doesn't update WeekView #410

Open ValentinRegnault opened 1 month ago

ValentinRegnault commented 1 month ago
WeekView(
  key: _weekViewKey,
  controller: _eventController,
  pageViewPhysics: const ClampingScrollPhysics(),
  startHour: _computeStartHour(),
  endHour: _computeEndHour(),
)

When the widget rebuilds with a new startHour and endHour, the widget stay the same.

I looked into the code and did the following changes in src/week_view/week_view.dart :

461 +    _startHour = widget.startHour;
462 +   _endHour = widget.endHour;
463    _calculateHeights();

And it works like a charm !