From caeeb5b6cd2ba60bb8b75df8ecb2d33fa7e17c8a Mon Sep 17 00:00:00 2001 From: Apurva-Simform <122270609+apurva010@users.noreply.github.com> Date: Thu, 9 May 2024 17:46:51 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20display=20live=20time=20i?= =?UTF-8?q?ndicator=20only=20when=20it=20is=20in=20between=20of=20startHou?= =?UTF-8?q?r=20and=20endHour=20#366=20(#365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + lib/src/components/_internal_components.dart | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bfd69c6..f6e77186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ - # [1.1.1] (UnReleased) +- Fixed live time indicator not displaying on correct position when start and end hour is set. [#366](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/366) - Fixed synchronization of scroll between pages in day and week view. [#186](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/186) - Added showWeekTileBorder field whether to show border for header in month view. [#306](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/306) - Fixed an issue related to hiding day, which is not in the current month in MonthView. [#328](https://github.com/SimformSolutionsPvtLtd/flutter_calendar_view/issues/328) diff --git a/lib/src/components/_internal_components.dart b/lib/src/components/_internal_components.dart index 48ce19b3..129e84c1 100644 --- a/lib/src/components/_internal_components.dart +++ b/lib/src/components/_internal_components.dart @@ -98,10 +98,13 @@ class _LiveTimeIndicatorState extends State { /// to set dy offset of live time indicator final startMinutes = widget.startHour * 60; - /// Check if live time is not between startHour and endHour then + /// Check if live time is not between startHour and endHour if it is then /// don't show live time indicator - if (_currentTime.hour > widget.startHour || - widget.endHour < _currentTime.hour) { + /// + /// e.g. startHour : 1:00, endHour : 13:00 and live time is 17:00 + /// then no need to display live time indicator on timeline + if (_currentTime.hour > widget.startHour && + widget.endHour <= _currentTime.hour) { return SizedBox.shrink(); } return CustomPaint(