DayView<T extends Object?> constructor

const DayView<T extends Object?>({
  1. Key? key,
  2. EventTileBuilder<T>? eventTileBuilder,
  3. StringProvider? dateStringBuilder,
  4. StringProvider? timeStringBuilder,
  5. EventController<T>? controller,
  6. bool showVerticalLine = true,
  7. Duration pageTransitionDuration = const Duration(milliseconds: 300),
  8. Curve pageTransitionCurve = Curves.ease,
  9. double? width,
  10. DateTime? minDay,
  11. DateTime? maxDay,
  12. DateTime? initialDay,
  13. HourIndicatorSettings? hourIndicatorSettings,
  14. CustomHourLinePainter? hourLinePainter,
  15. double heightPerMinute = 0.7,
  16. DateWidgetBuilder? timeLineBuilder,
  17. double? timeLineWidth,
  18. double timeLineOffset = 0,
  19. bool showLiveTimeLineInAllDays = false,
  20. LiveTimeIndicatorSettings? liveTimeIndicatorSettings,
  21. CalendarPageChangeCallBack? onPageChange,
  22. DateWidgetBuilder? dayTitleBuilder,
  23. EventArranger<T>? eventArranger,
  24. double verticalLineOffset = 10,
  25. Color? backgroundColor = Colors.white,
  26. double? scrollOffset,
  27. CellTapCallback<T>? onEventTap,
  28. DatePressCallback? onDateLongPress,
  29. DateTapCallback? onDateTap,
  30. MinuteSlotSize minuteSlotSize = MinuteSlotSize.minutes60,
  31. HeaderStyle headerStyle = const HeaderStyle(),
  32. FullDayEventBuilder<T>? fullDayEventBuilder,
  33. SafeAreaOption safeAreaOption = const SafeAreaOption(),
  34. ScrollPhysics? scrollPhysics,
  35. ScrollPhysics? pageViewPhysics,
  36. DetectorBuilder<Object?>? dayDetectorBuilder,
  37. bool showHalfHours = false,
  38. bool showQuarterHours = false,
  39. HourIndicatorSettings? halfHourIndicatorSettings,
  40. int? startHour,
  41. HourIndicatorSettings? quarterHourIndicatorSettings,
  42. Duration startDuration = const Duration(hours: 0),
  43. HeaderTitleCallback? onHeaderTitleTap,
  44. 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);