samderlust / calendar_day_view

MIT License
6 stars 11 forks source link

[category] boxconstraints maxheight is incorrect, when heightPerMin is greater than 1 #25

Open baraya opened 4 months ago

baraya commented 4 months ago

In category_overflow_calendar_day_view.dart _DayViewBody class the event box constraint maxHeight is the event duration in minutes. But if I increase the heightPerMin for the calendar, then the event height is smaller than the actual duration height. Workaround was to pass a constraint with the maxHeight being the durationInMins * heightPerMin (from the calendar constructor).

Workaround

  static const double heightPerMin = 5;
...
eventBuilder: (constraints, category, time, event) {
return Container(
  constraints: BoxConstraints(
                              minWidth: 50
                              maxHeight: event.durationInMins * heightPerMin,
  )
)})