diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 94dd2276..8c8fe21e 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.5.3 <4.0.0" + flutter: 3.24.3 dependencies: flutter: @@ -29,7 +30,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 intl: - flutter_colorpicker: ^0.6.0 + flutter_colorpicker: ^1.1.0 calendar_view: path: ../ diff --git a/lib/src/components/_internal_components.dart b/lib/src/components/_internal_components.dart index 129e84c1..d764d858 100644 --- a/lib/src/components/_internal_components.dart +++ b/lib/src/components/_internal_components.dart @@ -175,7 +175,7 @@ class TimeLine extends StatefulWidget { required this.height, required this.timeLineOffset, required this.timeLineBuilder, - required this.startHour, + this.startHour = 0, this.showHalfHours = false, this.showQuarterHours = false, required this.liveTimeIndicatorSettings, @@ -248,14 +248,14 @@ class _TimeLineState extends State { minutes: 30, ), if (widget.showQuarterHours) - for (int i = 0; i < widget.endHour; i++) ...[ + for (int i = widget.startHour; i < widget.endHour; i++) ...[ /// this is for 15 minutes _timelinePositioned( - topPosition: widget.hourHeight * i - + topPosition: widget.hourHeight * (i - widget.startHour) - widget.timeLineOffset + widget.hourHeight * 0.25, bottomPosition: widget.height - - (widget.hourHeight * (i + 1)) + + (widget.hourHeight * (i - widget.startHour + 1)) + widget.timeLineOffset, hour: i, minutes: 15, @@ -263,11 +263,11 @@ class _TimeLineState extends State { /// this is for 45 minutes _timelinePositioned( - topPosition: widget.hourHeight * i - + topPosition: widget.hourHeight * (i - widget.startHour) - widget.timeLineOffset + widget.hourHeight * 0.75, bottomPosition: widget.height - - (widget.hourHeight * (i + 1)) + + (widget.hourHeight * (i - widget.startHour + 1)) + widget.timeLineOffset, hour: i, minutes: 45, diff --git a/lib/src/week_view/_internal_week_view_page.dart b/lib/src/week_view/_internal_week_view_page.dart index 2603e890..bc7e5ab0 100644 --- a/lib/src/week_view/_internal_week_view_page.dart +++ b/lib/src/week_view/_internal_week_view_page.dart @@ -5,8 +5,8 @@ import 'package:flutter/material.dart'; import '../components/_internal_components.dart'; -import '../components/week_view_components.dart'; import '../components/event_scroll_notifier.dart'; +import '../components/week_view_components.dart'; import '../enumerations.dart'; import '../event_arrangers/event_arrangers.dart'; import '../event_controller.dart'; @@ -353,8 +353,12 @@ class _InternalWeekViewPageState minuteHeight: widget.heightPerMinute, verticalLineOffset: widget.verticalLineOffset, showVerticalLine: widget.showVerticalLine, - startHour: widget.startHour, + lineStyle: widget.hourIndicatorSettings.lineStyle, + dashWidth: widget.hourIndicatorSettings.dashWidth, + dashSpaceWidth: + widget.hourIndicatorSettings.dashSpaceWidth, emulateVerticalOffsetBy: widget.emulateVerticalOffsetBy, + startHour: widget.startHour, endHour: widget.endHour, ), ),