GlassCalendar constructor

const GlassCalendar({
  1. Key? key,
  2. required DateTime? selectedDate,
  3. required ValueChanged<DateTime>? onDateSelected,
  4. DateTime? initialMonth,
  5. DateTime? firstDate,
  6. DateTime? lastDate,
  7. DateTime? currentDate,
  8. int firstDayOfWeek = DateTime.monday,
  9. ValueChanged<DateTime>? onMonthChanged,
  10. Color? activeColor,
  11. double maxWidth = 360,
  12. String? semanticLabel,
  13. FocusNode? focusNode,
  14. bool autofocus = false,
})

Creates a calendar; firstDayOfWeek is a DateTime weekday, from DateTime.monday to DateTime.sunday.

Implementation

const GlassCalendar({
  super.key,
  required this.selectedDate,
  required this.onDateSelected,
  this.initialMonth,
  this.firstDate,
  this.lastDate,
  this.currentDate,
  this.firstDayOfWeek = DateTime.monday,
  this.onMonthChanged,
  this.activeColor,
  this.maxWidth = 360,
  this.semanticLabel,
  this.focusNode,
  this.autofocus = false,
}) : assert(firstDayOfWeek >= DateTime.monday && firstDayOfWeek <= DateTime.sunday);