isDisabled method

  1. @override
bool isDisabled(
  1. DateTime date
)
override

Determines if the given date should be disabled.

Returns true if the date is before today's date (ignoring time). Uses the toDateOnly() method to compare only the date part of the DateTime.

Implementation

@override
bool isDisabled(DateTime date) {
  final today = DateTime.now().toDateOnly();
  return date.toDateOnly().isBefore(today);
}