HorizontalView.defaults constructor

HorizontalView.defaults({
  1. Key? key,
  2. BoxDecoration? decoration,
  3. BoxDecoration? userPickedDecoration,
  4. Widget? defaultChild,
  5. Widget? userPickedChild,
  6. required bool showMonthYearPicker,
  7. TextStyle? headerTextStyle,
  8. Color? headerIconColor,
  9. double? headerHeight,
  10. Color? monthYearPickerSelectedMonthColor,
  11. Color? monthYearPickerUnselectedMonthColor,
  12. int? monthYearPickerCrossAxisCount,
  13. double? monthYearPickerChildAspectRatio,
  14. BoxDecoration? monthYearPickerMonthItemDecoration,
  15. bool showWeekDays = true,
  16. TextStyle? dateTextStyle,
  17. TextStyle? weekDaysTextStyle,
  18. TextStyle? selectedDateTextStyle,
  19. TextStyle? selectedWeekDaysTextStyle,
})

Creates a new instance of the HorizontalView widget with default values.

This constructor initializes initialDate and endDate to DateTime.now() and enables autoScroll by default.

Implementation

factory HorizontalView.defaults({
  Key? key,
  BoxDecoration? decoration,
  BoxDecoration? userPickedDecoration,
  Widget? defaultChild,
  Widget? userPickedChild,
  required bool showMonthYearPicker,
  TextStyle? headerTextStyle,
  Color? headerIconColor,
  double? headerHeight,
  Color? monthYearPickerSelectedMonthColor,
  Color? monthYearPickerUnselectedMonthColor,
  int? monthYearPickerCrossAxisCount,
  double? monthYearPickerChildAspectRatio,
  BoxDecoration? monthYearPickerMonthItemDecoration,
  bool showWeekDays = true,
  TextStyle? dateTextStyle,
  TextStyle? weekDaysTextStyle,
  TextStyle? selectedDateTextStyle,
  TextStyle? selectedWeekDaysTextStyle,
}) {
  return HorizontalView(
    key: key,
    decoration: decoration,
    userPickedDecoration: userPickedDecoration,
    defaultChild: defaultChild,
    userPickedChild: userPickedChild,
    showMonthYearPicker: showMonthYearPicker,
    headerTextStyle: headerTextStyle,
    headerIconColor: headerIconColor,
    headerHeight: headerHeight,
    monthYearPickerSelectedMonthColor: monthYearPickerSelectedMonthColor,
    monthYearPickerUnselectedMonthColor: monthYearPickerUnselectedMonthColor,
    monthYearPickerCrossAxisCount: monthYearPickerCrossAxisCount,
    monthYearPickerChildAspectRatio: monthYearPickerChildAspectRatio,
    monthYearPickerMonthItemDecoration: monthYearPickerMonthItemDecoration,
    showWeekDays: showWeekDays,
    dateTextStyle: dateTextStyle,
    weekDaysTextStyle: weekDaysTextStyle,
    selectedDateTextStyle: selectedDateTextStyle,
    selectedWeekDaysTextStyle: selectedWeekDaysTextStyle,
    initialDate: DateTime.now(),
    endDate: DateTime.now(),
    autoScroll: true,
  );
}