selectableDayPredicate property Null safety

DateRangePickerSelectableDayPredicate? selectableDayPredicate

An selectableDayPredicate callback to decide whether the cell is selectable or not in date range picker.

Note: This callback is not applicable when the navigationMode set as DateRangePickerNavigationMode.scroll.

Defaults to null.

See also: DateRangePickerMonthViewSettings.blackoutDates, which allows to disable interaction for specific dates.

Widget build(BuildContext context) {
  return MaterialApp(
      home: Scaffold(
        body: SfDateRangePicker(
          initialDisplayDate: DateTime(2022),
          selectableDayPredicate: (DateTime dateTime) {
            if (dateTime != DateTime(2022)) {
              return false;
            return true;


final DateRangePickerSelectableDayPredicate? selectableDayPredicate;