CustomCalendarViewer constructor

const CustomCalendarViewer({
  1. Key? key,
  2. Duration duration = const Duration(milliseconds: 600),
  3. Duration yearDuration = const Duration(milliseconds: 500),
  4. List<Date>? dates,
  5. List<RangeDate>? ranges,
  6. List<Color>? daysNameColors,
  7. dynamic onDayTapped(
    1. DateTime date
    )?,
  8. dynamic onCalendarUpdate(
    1. DateTime date
    )?,
  9. dynamic onDatesUpdated(
    1. List<Date>
    )?,
  10. dynamic onRangesUpdated(
    1. List<RangeDate>
    )?,
  11. CustomCalendarType calendarType = CustomCalendarType.view,
  12. CustomCalendarStyle calendarStyle = CustomCalendarStyle.withBorder,
  13. CustomCalendarStartDay calendarStartDay = CustomCalendarStartDay.monday,
  14. CustomCalendarAnimatedDirection animateDirection = CustomCalendarAnimatedDirection.horizontal,
  15. int startYear = 2010,
  16. int endYear = 2050,
  17. Widget? separatedWidget,
  18. Color activeColor = Colors.blue,
  19. Color dropArrowColor = Colors.black,
  20. Color movingArrowColor = Colors.black,
  21. Border? currentDayBorder,
  22. Border? dayBorder,
  23. Color headerBackground = Colors.transparent,
  24. Color daysHeaderBackground = Colors.transparent,
  25. Color daysBodyBackground = Colors.transparent,
  26. bool showCurrentDayBorder = true,
  27. bool showBorderAfterDayHeader = false,
  28. bool showMonthAndYearHeader = false,
  29. MainAxisAlignment headerAlignment = MainAxisAlignment.spaceBetween,
  30. bool showHeader = true,
  31. double dropArrowSize = 34,
  32. double movingArrowSize = 16,
  33. double spaceBetweenMovingArrow = 48,
  34. DateTime? closeDateBefore,
  35. Color closedDatesColor = Colors.grey,
  36. double radius = 40,
  37. TextStyle headerStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  38. TextStyle dropDownYearsStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  39. TextStyle dayNameStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  40. TextStyle inActiveStyle = const TextStyle(fontWeight: FontWeight.w400, fontSize: 14, color: Colors.black),
  41. TextStyle activeStyle = const TextStyle(fontWeight: FontWeight.w400, fontSize: 14, color: Colors.white),
  42. EdgeInsets headerMargin = const EdgeInsets.only(left: 42, right: 42, top: 8, bottom: 10),
  43. EdgeInsets daysMargin = const EdgeInsets.only(left: 45, right: 45, top: 0, bottom: 0),
  44. Alignment iconAlignment = Alignment.topLeft,
  45. EdgeInsets iconPadding = EdgeInsets.zero,
  46. Color calendarBorderColor = Colors.grey,
  47. double calendarBorderRadius = 10,
  48. double calendarBorderWidth = 1,
  49. String local = 'en',
  50. String toolTipMessage = 'Message',
  51. double? toolTipHeight,
  52. double toolTipAddSpaceLeft = 10,
  53. double toolTipAddSpaceTop = 15,
  54. EdgeInsets? toolTipPadding,
  55. Decoration? toolTipDecoration,
  56. TextStyle? toolTipTextStyle,
  57. TextAlign? toolTipTextAlign,
  58. Duration toolTipWaitDuration = const Duration(seconds: 2),
  59. bool showTooltip = false,
  60. Color addDatesIndicatorColor = Colors.grey,
  61. Color addDatesIndicatorActiveColor = Colors.blue,
  62. TextStyle addDatesTextStyle = const TextStyle(fontWeight: FontWeight.w500, color: Colors.black, fontSize: 14),
  63. TextStyle addDatesActiveTextStyle = const TextStyle(fontWeight: FontWeight.w600, color: Colors.blue, fontSize: 14),
  64. EdgeInsets addDatesMargin = const EdgeInsets.only(left: 45, right: 45, top: 10, bottom: 0),
})

Implementation

const CustomCalendarViewer({
  super.key,
  this.duration = const Duration(milliseconds: 600),
  this.yearDuration = const Duration(milliseconds: 500),
  this.dates,
  this.ranges,
  this.daysNameColors,
  this.onDayTapped,
  this.onCalendarUpdate,
  this.onDatesUpdated,
  this.onRangesUpdated,
  this.calendarType = CustomCalendarType.view,
  this.calendarStyle = CustomCalendarStyle.withBorder,
  this.calendarStartDay = CustomCalendarStartDay.monday,
  this.animateDirection = CustomCalendarAnimatedDirection.horizontal,
  this.startYear = 2010,
  this.endYear = 2050,
  this.separatedWidget,
  this.activeColor = Colors.blue,
  this.dropArrowColor = Colors.black,
  this.movingArrowColor = Colors.black,
  this.currentDayBorder,
  this.dayBorder,
  this.headerBackground = Colors.transparent,
  this.daysHeaderBackground = Colors.transparent,
  this.daysBodyBackground = Colors.transparent,
  this.showCurrentDayBorder = true,
  this.showBorderAfterDayHeader = false,
  this.showMonthAndYearHeader = false,
  this.headerAlignment = MainAxisAlignment.spaceBetween,
  this.showHeader = true,
  this.dropArrowSize = 34,
  this.movingArrowSize = 16,
  this.spaceBetweenMovingArrow = 48,
  this.closeDateBefore,
  this.closedDatesColor = Colors.grey,
  this.radius = 40,
  this.headerStyle = const TextStyle(
      fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  this.dropDownYearsStyle = const TextStyle(
      fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  this.dayNameStyle = const TextStyle(
      fontWeight: FontWeight.w600, fontSize: 14, color: Colors.black),
  this.inActiveStyle = const TextStyle(
      fontWeight: FontWeight.w400, fontSize: 14, color: Colors.black),
  this.activeStyle = const TextStyle(
    fontWeight: FontWeight.w400,
    fontSize: 14,
    color: Colors.white,
  ),
  this.headerMargin =
      const EdgeInsets.only(left: 42, right: 42, top: 8, bottom: 10),
  this.daysMargin =
      const EdgeInsets.only(left: 45, right: 45, top: 0, bottom: 0),
  this.iconAlignment = Alignment.topLeft,
  this.iconPadding = EdgeInsets.zero,
  this.calendarBorderColor = Colors.grey,
  this.calendarBorderRadius = 10,
  this.calendarBorderWidth = 1,
  this.local = 'en',
  this.toolTipMessage = 'Message',
  this.toolTipHeight,
  this.toolTipAddSpaceLeft = 10,
  this.toolTipAddSpaceTop = 15,
  this.toolTipPadding,
  this.toolTipDecoration,
  this.toolTipTextStyle,
  this.toolTipTextAlign,
  this.toolTipWaitDuration = const Duration(seconds: 2),
  this.showTooltip = false,
  this.addDatesIndicatorColor = Colors.grey,
  this.addDatesIndicatorActiveColor = Colors.blue,
  this.addDatesTextStyle = const TextStyle(
    fontWeight: FontWeight.w500,
    color: Colors.black,
    fontSize: 14,
  ),
  this.addDatesActiveTextStyle = const TextStyle(
    fontWeight: FontWeight.w600,
    color: Colors.blue,
    fontSize: 14,
  ),
  this.addDatesMargin =
      const EdgeInsets.only(left: 45, right: 45, top: 10, bottom: 0),
});