HorizontalView.defaults constructor

HorizontalView.defaults({
  1. required DateTime selectedMonth,
  2. required void onUserPicked(
    1. DateTime
    ),
  3. bool showWeekDays = true,
  4. TextStyle? dateTextStyle,
  5. TextStyle? weekDaysTextStyle,
  6. TextStyle? selectedDateTextStyle,
  7. TextStyle? selectedWeekDaysTextStyle,
  8. DateTime? initialDate,
  9. DateTime? endDate,
  10. MCalendarController? controller,
  11. CalendarAnimations? animations,
})

Default factory constructor with pre-configured decorations.

Implementation

factory HorizontalView.defaults({
  required DateTime selectedMonth,
  required void Function(DateTime) onUserPicked,
  bool showWeekDays = true,
  TextStyle? dateTextStyle,
  TextStyle? weekDaysTextStyle,
  TextStyle? selectedDateTextStyle,
  TextStyle? selectedWeekDaysTextStyle,
  DateTime? initialDate,
  DateTime? endDate,
  MCalendarController? controller,
  CalendarAnimations? animations,
}) {
  return HorizontalView(
    selectedMonth: selectedMonth,
    onUserPicked: onUserPicked,
    showWeekDays: showWeekDays,
    dateTextStyle: dateTextStyle,
    weekDaysTextStyle: weekDaysTextStyle,
    selectedDateTextStyle: selectedDateTextStyle,
    selectedWeekDaysTextStyle: selectedWeekDaysTextStyle,
    initialDate: initialDate,
    endDate: endDate,
    controller: controller,
    animations: animations,
  );
}