smartNoteDate property

  1. @override
DateTime? smartNoteDate
override

Implementation

@override
DateTime? get smartNoteDate {
  final firstHistorical = _factSchema?.firstHistoricalDate;
  if (firstHistorical == null) {
    return null;
  } else {
    if (firstHistorical.isFlexible == true) {
      FlexiDate? flexiDate = this.getByPath(firstHistorical.path!);
      if (flexiDate?.isFullDate == true) {
        return flexiDate?.toDateTime();
      } else {
        /// If the user doesn't have a year set, put it at the top of the timeline
        return this.dateCreated ?? DateTime.now();
      }
    } else {
      return this.getByPath(firstHistorical.path!);
    }
  }
}