date property

Date? get date

The selected date or null if the date picker has invalid input.

Implementation

Date? get date => _date;
set date (Date? value)

Implementation

set date(Date? value) {
  if (value != _date) {
    _date = value;
    if (_date != null && _time == null) {
      // Set default time to minimum time if date is minimum date.
      if (_sameDate(_date, minDateTime)) {
        _time = cloneDateTime(minDateTime);
      } else {
        _time = _utc ? DateTime.utc(_date!.year) : DateTime(_date!.year);
      }
    }
    _updateDateTimeAndNotify();
  }
}