SelectableDayForRangePredicate typedef
Signature for predicating enabled dates in date range pickers.
The selectedStartDay
and selectedEndDay
are the currently selected start
and end dates of a date range, which conditionally enables or disables each
date in the picker based on the user selection. (Example: in a hostel's room
selection, you are not able to select the end date after the next
non-selectable day).
See showDateRangePicker, which has a SelectableDayForRangePredicate parameter used to specify allowable days in the date range picker.
Implementation
typedef SelectableDayForRangePredicate = bool Function(DateTime day, DateTime? selectedStartDay, DateTime? selectedEndDay);