Skip to content

Conversation

@Bonway
Copy link
Contributor

@Bonway Bonway commented Mar 11, 2025

Description

I have added a multi-day view to fulfill my current requirements. Instead of directly modifying the existing week view, I created a new MultiDayView. However, if needed, I can integrate the changes directly into WeekView.

For the week view, I believe that when the app opens in this mode, the first visible day should always be today, while ensuring that navigation and scrolling behaviors align with the expected restrictions.

Currently, I have only utilized properties like showWeek and weekdays, which are not fully applicable to the multi-day view.

Additionally, I noticed your other branch that implements a 3-day view, but it has a bug where the selected date does not match the navigation target. The core issue seems to stem from relying directly on the number of days in a week for calculations, which causes inconsistencies.

I have also added a single-day timeline display, as well as a bottom line beneath the weekly view for better visual clarity.
screenshot-20250311-161635
screenshot-20250311-161653
screenshot-20250311-155734

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
  • I have followed the [Contributor Guide] when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • [] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Migration instructions

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #382

@Bonway
Copy link
Contributor Author

Bonway commented Mar 11, 2025

I haven’t updated the documentation yet. I would like to confirm the direction first before proceeding with the documentation and further refinements.

@Bonway Bonway changed the title feat: Add Multi-Day View Support feat: Fixes issue #382: Add Multi-Day View Support Mar 11, 2025
Copy link
Collaborator

@PRBaraiya PRBaraiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check all the comments.

Aside from this, please check and update documentation if necessary, remove unnecessary commented code or add notes if commented code can be reused in future and resolve merge conflicts.

Thanks for raising this PR. We are looking forward to your response.

daysInView: 3,
width: width,
showLiveTimeLineInAllDays: true,
eventArranger: SideEventArranger(maxWidth: 30),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove max width from this.

int getMultiDayDifference(
{required DateTime startDate,
required DateTime endDate,
daysInView = 3}) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define type here

required this.heightPerMinute,
required this.startHour,
this.endHour = Constants.hoursADay,
this.onlyShowToday = false})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor this code

@override
Widget build(BuildContext context) {
final filteredDates = _filteredDate();
return Container(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use sizedbox here?

: VerticalDirection.down,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use DecoratedBox

),
SizedBox(
width: widget.width,
child: Container(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

(index) {
final fullDayEventList = widget.controller
.getFullDayEvent(filteredDates[index]);
return Container(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

@PRBaraiya
Copy link
Collaborator

Changes are merged with #482

@PRBaraiya PRBaraiya closed this Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add 3-Day View to Calendar

2 participants