MonthItem constructor

MonthItem({
  1. Key? key,
  2. required DateTime? selectedDateStart,
  3. required DateTime? selectedDateEnd,
  4. required DateTime currentDate,
  5. required ValueChanged<DateTime> onChanged,
  6. required DateTime firstDate,
  7. required DateTime lastDate,
  8. required DateTime displayedMonth,
  9. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  10. Color? highLightColor,
  11. Color? selectedColor,
  12. TextStyle? selectedTextStyle,
  13. TextStyle? disabledTexStyle,
  14. bool showCurrentDay = true,
  15. Color? currentDayStrokeColor,
  16. double? itemHeight,
  17. Color? splashColor,
  18. double? spaceBetweenEachMonth,
  19. double? spaceBetweenRows,
  20. TextStyle? dayTextStyle,
  21. double? monthNameHeight,
  22. TextStyle? monthTextStyle,
})

Creates a month item.

Implementation

MonthItem({
  Key? key,
  required this.selectedDateStart,
  required this.selectedDateEnd,
  required this.currentDate,
  required this.onChanged,
  required this.firstDate,
  required this.lastDate,
  required this.displayedMonth,
  this.dragStartBehavior = DragStartBehavior.start,
  this.highLightColor,
  this.selectedColor,
  this.selectedTextStyle,
  this.disabledTexStyle,
  this.showCurrentDay = true,
  this.currentDayStrokeColor,
  this.itemHeight,
  this.splashColor,
  this.spaceBetweenEachMonth,
  this.spaceBetweenRows,
  this.dayTextStyle,
  this.monthNameHeight,
  this.monthTextStyle,
})  : assert(!firstDate.isAfter(lastDate)),
      assert(selectedDateStart == null || !selectedDateStart.isBefore(firstDate)),
      assert(selectedDateEnd == null || !selectedDateEnd.isBefore(firstDate)),
      assert(selectedDateStart == null || !selectedDateStart.isAfter(lastDate)),
      assert(selectedDateEnd == null || !selectedDateEnd.isAfter(lastDate)),
      assert(selectedDateStart == null || selectedDateEnd == null || !selectedDateStart.isAfter(selectedDateEnd)),
      super(key: key);