toSmartDateQuery method

FactSmartDateQuerySource? toSmartDateQuery(
  1. IRef? contact,
  2. Location location
)

Implementation

FactSmartDateQuerySource? toSmartDateQuery(IRef? contact, Location location) {
  assert(fact != null);

  final resolvedDate = fact!.getDate(metaDate, location);
  final resolvedFlexiDate = fact!.getFlexiDate(metaDate);
  if (resolvedDate != null || resolvedFlexiDate != null) {
    return FactSmartDateQuerySource.ofSchemaQuery(
      this,
      contact,
      resolvedDate: resolvedDate!,
      resolvedFlexiDate: resolvedFlexiDate,
    );
  } else {
    return null;
  }
}