HorizontalView.defaults constructor
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,
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,
);
}