DayView<T extends Object?> constructor
const
DayView<T extends Object?> ({
- Key? key,
- EventTileBuilder<
T> ? eventTileBuilder, - StringProvider? dateStringBuilder,
- StringProvider? timeStringBuilder,
- EventController<
T> ? controller, - bool showVerticalLine = true,
- Duration pageTransitionDuration = const Duration(milliseconds: 300),
- Curve pageTransitionCurve = Curves.ease,
- double? width,
- DateTime? minDay,
- DateTime? maxDay,
- DateTime? initialDay,
- HourIndicatorSettings? hourIndicatorSettings,
- CustomHourLinePainter? hourLinePainter,
- double heightPerMinute = 0.7,
- DateWidgetBuilder? timeLineBuilder,
- double? timeLineWidth,
- double timeLineOffset = 0,
- bool showLiveTimeLineInAllDays = false,
- LiveTimeIndicatorSettings? liveTimeIndicatorSettings,
- CalendarPageChangeCallBack? onPageChange,
- DateWidgetBuilder? dayTitleBuilder,
- EventArranger<
T> ? eventArranger, - double verticalLineOffset = 10,
- Color? backgroundColor = Colors.white,
- double? scrollOffset,
- CellTapCallback<
T> ? onEventTap, - DatePressCallback? onDateLongPress,
- DateTapCallback? onDateTap,
- MinuteSlotSize minuteSlotSize = MinuteSlotSize.minutes60,
- HeaderStyle headerStyle = const HeaderStyle(),
- FullDayEventBuilder<
T> ? fullDayEventBuilder, - SafeAreaOption safeAreaOption = const SafeAreaOption(),
- ScrollPhysics? scrollPhysics,
- ScrollPhysics? pageViewPhysics,
- DetectorBuilder<
Object?> ? dayDetectorBuilder, - bool showHalfHours = false,
- bool showQuarterHours = false,
- HourIndicatorSettings? halfHourIndicatorSettings,
- int? startHour,
- HourIndicatorSettings? quarterHourIndicatorSettings,
- Duration startDuration = const Duration(hours: 0),
- HeaderTitleCallback? onHeaderTitleTap,
- double emulateVerticalOffsetBy = 0,
Main widget for day view.
Implementation
const DayView({
Key? key,
this.eventTileBuilder,
this.dateStringBuilder,
this.timeStringBuilder,
this.controller,
this.showVerticalLine = true,
this.pageTransitionDuration = const Duration(milliseconds: 300),
this.pageTransitionCurve = Curves.ease,
this.width,
this.minDay,
this.maxDay,
this.initialDay,
this.hourIndicatorSettings,
this.hourLinePainter,
this.heightPerMinute = 0.7,
this.timeLineBuilder,
this.timeLineWidth,
this.timeLineOffset = 0,
this.showLiveTimeLineInAllDays = false,
this.liveTimeIndicatorSettings,
this.onPageChange,
this.dayTitleBuilder,
this.eventArranger,
this.verticalLineOffset = 10,
this.backgroundColor = Colors.white,
this.scrollOffset,
this.onEventTap,
this.onDateLongPress,
this.onDateTap,
this.minuteSlotSize = MinuteSlotSize.minutes60,
this.headerStyle = const HeaderStyle(),
this.fullDayEventBuilder,
this.safeAreaOption = const SafeAreaOption(),
this.scrollPhysics,
this.pageViewPhysics,
this.dayDetectorBuilder,
this.showHalfHours = false,
this.showQuarterHours = false,
this.halfHourIndicatorSettings,
this.startHour,
this.quarterHourIndicatorSettings,
this.startDuration = const Duration(hours: 0),
this.onHeaderTitleTap,
this.emulateVerticalOffsetBy = 0,
}) : assert(!(onHeaderTitleTap != null && dayTitleBuilder != null),
"can't use [onHeaderTitleTap] & [dayTitleBuilder] simultaneously"),
assert(timeLineOffset >= 0,
"timeLineOffset must be greater than or equal to 0"),
assert(width == null || width > 0,
"Calendar width must be greater than 0."),
assert(timeLineWidth == null || timeLineWidth > 0,
"Time line width must be greater than 0."),
assert(
heightPerMinute > 0, "Height per minute must be greater than 0."),
assert(
dayDetectorBuilder == null || onDateLongPress == null,
"""If you use [dayPressDetectorBuilder]
do not provide [onDateLongPress]""",
),
super(key: key);