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