HorizontalWeekCalendar constructor
HorizontalWeekCalendar({
- Key? key,
- dynamic onDateChange()?,
- dynamic onWeekChange()?,
- Color? activeBackgroundColor,
- Color? inactiveBackgroundColor,
- Color? disabledBackgroundColor = Colors.grey,
- Color? activeTextColor = Colors.white,
- Color? inactiveTextColor = Colors.white,
- Color? disabledTextColor = Colors.white,
- Color? monthColor,
- WeekStartFrom? weekStartFrom = WeekStartFrom.monday,
- BorderRadiusGeometry? borderRadius,
- ScrollPhysics? scrollPhysics = const ClampingScrollPhysics(),
- String? monthFormat,
- required DateTime minDate,
- required DateTime maxDate,
- required DateTime initialDate,
Creates a HorizontalWeekCalendar widget.
Assertions:
minDatemust be beforemaxDateinitialDatemust be betweenminDateandmaxDate
Implementation
HorizontalWeekCalendar({
super.key,
this.onDateChange,
this.onWeekChange,
this.activeBackgroundColor,
this.inactiveBackgroundColor,
this.disabledBackgroundColor = Colors.grey,
this.activeTextColor = Colors.white,
this.inactiveTextColor = Colors.white,
this.disabledTextColor = Colors.white,
this.activeNavigatorColor,
this.inactiveNavigatorColor,
this.monthColor,
this.weekStartFrom = WeekStartFrom.monday,
this.borderRadius,
this.scrollPhysics = const ClampingScrollPhysics(),
this.showNavigationButtons = true,
this.monthFormat,
required this.minDate,
required this.maxDate,
required this.initialDate,
this.showTopNavbar = true,
}) :
// assert(minDate != null && maxDate != null),
assert(minDate.isBefore(maxDate)),
assert(
minDate.isBefore(initialDate) && (initialDate).isBefore(maxDate)),
super();