monthViewSettings property Null safety

DateRangePickerMonthViewSettings monthViewSettings
final

The settings have properties which allow to customize the month view of the SfDateRangePicker.

Allows to customize the DateRangePickerMonthViewSettings.numberOfWeeksInView, DateRangePickerMonthViewSettings.firstDayOfWeek, DateRangePickerMonthViewSettings.dayFormat, DateRangePickerMonthViewSettings.viewHeaderHeight, DateRangePickerMonthViewSettings.showTrailingAndLeadingDates, DateRangePickerMonthViewSettings.viewHeaderStyle, DateRangePickerMonthViewSettings.enableSwipeSelection, DateRangePickerMonthViewSettings.blackoutDates, DateRangePickerMonthViewSettings.specialDates and DateRangePickerMonthViewSettings.weekendDays in month view of date range picker.

See also:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         view: DateRangePickerView.month,
         monthViewSettings: DateRangePickerMonthViewSettings(
             numberOfWeeksInView: 5,
             firstDayOfWeek: 1,
             dayFormat: 'E',
             viewHeaderHeight: 70,
             selectionRadius: 10,
             showTrailingAndLeadingDates: true,
             viewHeaderStyle: DateRangePickerViewHeaderStyle(
                 backgroundColor: Colors.blue,
                 textStyle:
                     TextStyle(fontWeight: FontWeight.w400,
                          fontSize: 15, color: Colors.black)),
             enableSwipeSelection: false,
             blackoutDates: <DateTime>[
               DateTime.now().add(Duration(days: 4))
             ],
             specialDates: <DateTime>[
               DateTime.now().add(Duration(days: 7)),
               DateTime.now().add(Duration(days: 8))
             ],
             weekendDays: <int>[
               DateTime.monday,
               DateTime.friday
             ]),
       ),
     ),
   );
 }

Implementation

final DateRangePickerMonthViewSettings monthViewSettings;