Skip to content

Commit

Permalink
✨ update example to support latest flutter versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthBaraiya committed Jun 13, 2024
1 parent d25452d commit 99bb35f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ List<CalendarEventData> _events = [
date: _now,
title: "Project meeting",
description: "Today is project meeting.",
startTime: DateTime(_now.year, _now.month, _now.day, 18, 30),
endTime: DateTime(_now.year, _now.month, _now.day, 22),
startTime: DateTime(_now.year, _now.month, _now.day, 0, 0),
endTime: DateTime(_now.year, _now.month, _now.day, 4, 0),
),
CalendarEventData(
date: _now.add(Duration(days: 1)),
Expand Down
1 change: 1 addition & 0 deletions example/lib/widgets/day_view_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DayViewWidget extends StatelessWidget {
),
verticalLineOffset: 0,
timeLineWidth: 65,
showQuarterHours: true,
showLiveTimeLineInAllDays: true,
liveTimeIndicatorSettings: LiveTimeIndicatorSettings(
color: Colors.redAccent,
Expand Down
4 changes: 1 addition & 3 deletions lib/src/components/common_components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ class DefaultPressDetector extends StatelessWidget {
width: width,
height: heightPerSlot,
child: kDebugMode
? ColoredBox(
color: Colors.red.withOpacity(0.2),
)
? ColoredBox(color: Colors.red.withOpacity(0.1))
: SizedBox.shrink(),
),
),
Expand Down
42 changes: 23 additions & 19 deletions lib/src/day_view/_internal_day_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,32 @@ class _InternalDayViewPageState<T extends Object?>
minuteSlotSize: widget.minuteSlotSize,
),
),

Align(
alignment: Alignment.centerRight,
child: EventGenerator<T>(
height: widget.height,
date: widget.date,
onTileLongTap: widget.onTileLongTap,
onTileDoubleTap: widget.onTileDoubleTap,
onTileTap: widget.onTileTap,
eventArranger: widget.eventArranger,
events: widget.controller.getEventsOnDay(
widget.date,
includeFullDayEvents: false,
child: Padding(
padding: widget.pagePadding,
child: EventGenerator<T>(
height: widget.height,
date: widget.date,
onTileLongTap: widget.onTileLongTap,
onTileDoubleTap: widget.onTileDoubleTap,
onTileTap: widget.onTileTap,
eventArranger: widget.eventArranger,
events: widget.controller.getEventsOnDay(
widget.date,
includeFullDayEvents: false,
),
heightPerMinute: widget.heightPerMinute,
eventTileBuilder: widget.eventTileBuilder,
scrollNotifier: widget.scrollNotifier,
startHour: widget.startHour,
endHour: widget.endHour,
width: widget.width -
widget.timeLineWidth -
widget.hourIndicatorSettings.offset -
widget.verticalLineOffset,
),
heightPerMinute: widget.heightPerMinute,
eventTileBuilder: widget.eventTileBuilder,
scrollNotifier: widget.scrollNotifier,
startHour: widget.startHour,
endHour: widget.endHour,
width: widget.width -
widget.timeLineWidth -
widget.hourIndicatorSettings.offset -
widget.verticalLineOffset,
),
),
TimeLine(
Expand Down

0 comments on commit 99bb35f

Please sign in to comment.