MonthlyCalendar constructor
MonthlyCalendar({
- Key? key,
- required DateTime startDateTime,
- required DateTime endDateTime,
- bool shortHeader = true,
- DateTime? selectedDateTime,
- MonthlyCalendarLocale locale = const EnglishMonthlyCalendarLocale(),
- ValueChanged<
DateTime> ? onMonthChanged, - ValueChanged<
DateTime> ? onSelectedDateChanged, - int firstWeekday = DateTime.monday,
- Duration pageViewAnimationDuration = const Duration(milliseconds: 200),
- Curve pageViewAnimationCurve = Curves.fastOutSlowIn,
- double pageViewEstimateHeight = 350,
- ScrollPhysics scrollPhysics = const PageScrollPhysics(),
- Clip clipBehavior = Clip.hardEdge,
- String? restorationId,
- MonthlyCalendarThemeData? theme,
- dynamic onCellLongPress(
- DateTime datetime
- MonthlyCalendarController? controller,
Implementation
MonthlyCalendar({
Key? key,
required this.startDateTime,
required this.endDateTime,
this.shortHeader = true,
this.selectedDateTime,
this.locale = const EnglishMonthlyCalendarLocale(),
this.onMonthChanged,
this.onSelectedDateChanged,
this.firstWeekday = DateTime.monday,
this.pageViewAnimationDuration = const Duration(milliseconds: 200),
this.pageViewAnimationCurve = Curves.fastOutSlowIn,
this.pageViewEstimateHeight = 350,
this.scrollPhysics = const PageScrollPhysics(),
this.clipBehavior = Clip.hardEdge,
this.restorationId,
this.theme,
this.onCellLongPress,
this.controller,
}) : assert(
firstWeekday == DateTime.monday ||
firstWeekday == DateTime.sunday ||
firstWeekday == DateTime.saturday,
"MonthlyCalendar support only Monday, Sunday, Saturday",
),
assert(startDateTime.isBefore(endDateTime)),
super(key: key);