getFactMetaDate method

Future<FactSchemaAndDate> getFactMetaDate(
  1. MetaDateRef ref
)

Implementation

Future<FactSchemaAndDate> getFactMetaDate(MetaDateRef ref) async {
  final schema = await loadFactSchema(ref.factRef);
  final date =
      schema.dates!.firstOrNull((metaDate) => metaDate.path == ref.path);
  return FactSchemaAndDate(
      schema,
      date ??
          illegalState<IFactMetaDate>(
              "Missing expected fact metadate: $ref"));
}