Skip to content

Commit

Permalink
Add onDateTap call to week and day views
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Viggiano authored and ParthBaraiya committed Nov 21, 2022
1 parent c9a2612 commit a598535
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/src/day_view/_internal_day_view_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class InternalDayViewPage<T extends Object?> extends StatelessWidget {
/// Called when user long press on calendar.
final DatePressCallback? onDateLongPress;

/// Called when user taps on calendar.
final DateTapCallback? onDateTap;

/// Defines size of the slots that provides long press callback on area
/// where events are not there.
final MinuteSlotSize minuteSlotSize;
Expand Down Expand Up @@ -98,6 +101,7 @@ class InternalDayViewPage<T extends Object?> extends StatelessWidget {
required this.verticalLineOffset,
required this.onTileTap,
required this.onDateLongPress,
required this.onDateTap,
required this.minuteSlotSize,
required this.scrollNotifier,
}) : super(key: key);
Expand All @@ -122,13 +126,13 @@ class InternalDayViewPage<T extends Object?> extends StatelessWidget {
),
PressDetector(
width: width,
height: height,
heightPerMinute: heightPerMinute,
date: date,
onDateTap: onDateTap,
onDateLongPress: onDateLongPress,
minuteSlotSize: minuteSlotSize,
),
height: height,
heightPerMinute: heightPerMinute,
date: date,
onDateTap: onDateTap,
onDateLongPress: onDateLongPress,
minuteSlotSize: minuteSlotSize,
),
Align(
alignment: Alignment.centerRight,
child: EventGenerator<T>(
Expand Down

0 comments on commit a598535

Please sign in to comment.