werner-scholtz / kalender

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

Add multi week view #2

Open pieter-scholtz opened 1 year ago

pieter-scholtz commented 1 year ago

Having a multi week view would make this package much nicer ! :D

werner-scholtz commented 1 year ago

Hi, can you maybe expanded on what you mean by multi week, maybe a screenshot or example ?

NguyenNTStudy commented 7 months ago

@werner-scholtz I got a broken layout error when I adding multi view over a period in week view mode. image

werner-scholtz commented 7 months ago

@NguyenNTStudy I created a new issue for this.

laguerreuy commented 4 months ago

That would be a very nice feature. I understand it's the possibility to see 14 or 21 days instead of 5 or 7. The package is great already

laguerreuy commented 4 months ago

image

This was my implementation for this.

return Row( children: List.generate(widget.amountOfWeeks, (index) { final prev = widget.amountOfWeeks - (index + 1); ViewConfiguration viewConfiguration = WeekConfiguration( initialHeightPerMinute: 0.5, timelineWidth: index == 0 ? 50 : 0, startHour: widget.minHrCtrlr.value, endHour: widget.maxHrCtrlr.value, createMultiDayEvents: false, createEvents: true, eventSnapping: true, showWeekNumber: false, ); return Expanded( child: CalendarView<DailyActivity>( controller: CalendarController<DailyActivity>( initialDate: widget.selectedUtcBoDDateNotifier.value.add( Duration( days: -7 * prev, ), ), ), eventsController: eventsController, viewConfiguration: viewConfiguration, tileBuilder: tileBuilder, multiDayTileBuilder: _multiDayTileBuilder, scheduleTileBuilder: _scheduleTileBuilder, components: components, eventHandlers: eventHandlers, ), ); }), );