Skip to content

Commit

Permalink
fix: šŸ› display live time indicator only when it is in between of starā€¦
Browse files Browse the repository at this point in the history
ā€¦tHour and endHour
  • Loading branch information
apurva010 committed May 9, 2024
1 parent 5921392 commit 04c804f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/src/components/_internal_components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ class _LiveTimeIndicatorState extends State<LiveTimeIndicator> {
/// 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 ||
///
/// 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();
}
Expand Down

0 comments on commit 04c804f

Please sign in to comment.