flutter_calendar_view icon indicating copy to clipboard operation
flutter_calendar_view copied to clipboard

Intermittent Gap in Timeline Display Causing Missing Hour

Open sawongam opened this issue 1 year ago • 4 comments

I've encountered an issue where, intermittently, there seems to be a gap in the timeline display, resulting in an hour being missing. This occurrence doesn't seem to follow a specific pattern; it happens randomly. I've tested this on multiple devices, and the issue persists across all of them. Could you please investigate this problem further?

For context, I'm using timelineBuilder in my implementation. Below is the relevant code snippet:

timelineBuilder: (time) {
  return Text(
    DateTimeUtils.formatTime(time),
    textAlign: TextAlign.center,
  );
}

Additionally, I've attached a screenshot below that illustrates the issue.

Screenshot_20240617_105631

sawongam avatar Jun 17 '24 05:06 sawongam

I can work on this issue : by giving the user the option to hide the current hour or not

mayank29malhotra avatar Jun 18 '24 17:06 mayank29malhotra

I can work on this issue : by giving the user the option to hide the current hour or not

Could you please explain the cause of the issues? Additionally, could you clarify how addressing option to hide current hour will impact the code?

sawongam avatar Jun 20 '24 01:06 sawongam

the issue is when the current hour is 4 PM then 4PM hour text is not visible due to code segment

visible: !((_currentTime.minute >= 45 && _currentTime.hour == hour - 1) || (_currentTime.minute <= 15 && _currentTime.hour == hour))

in the internal Components.

So the visibility of the Hour text is calculated here here we can add a parameter if that is true the visibility should be true else it will be calculated like this, and the parameter will be false by default.

mayank29malhotra avatar Jun 20 '24 04:06 mayank29malhotra

Hi @sawongam,

Thanks for reporting the issue. I couldn't replicate the problem when running the code from the latest commit on the master branch. Could you please check from your end using the master branch and let us know if the issue persists?

@mayank29malhotra, your contribution here would be appreciated as well.

Thank you!

DhavalRKansara avatar Jul 11 '24 08:07 DhavalRKansara