of static method

FactSchema of({
  1. required MSchemaRef? ref,
  2. required IMSchemaDefinition? mschema,
  3. MSchemaRef? recordType,
  4. required String? category,
  5. Map<String, IFactSchemaTemplate>? templates,
  6. String? icon,
  7. List<IFactTense>? tenses,
  8. List<String>? factTokens,
  9. String? bundle,
  10. List<IFactMetaDate>? dates,
  11. List<IFactLink>? links,
  12. IFactDuration? duration,
  13. bool? isSingleton = false,
  14. bool? isAttribute = false,
})

Implementation

static FactSchema of(
    {required MSchemaRef? ref,
    required IMSchemaDefinition? mschema,
    MSchemaRef? recordType,
    required String? category,
    Map<String, IFactSchemaTemplate>? templates,
    String? icon,
    List<IFactTense>? tenses,
    List<String>? factTokens,
    String? bundle,
    List<IFactMetaDate>? dates,
    List<IFactLink>? links,
    IFactDuration? duration,
    bool? isSingleton = false,
    bool? isAttribute = false}) {
  final self =
      FactSchema(<String, dynamic>{}, mtype: FactSchemaRef, update: true);
  if (ref != null) self.ref = ref;
  if (mschema != null) self.mschema = mschema;
  if (recordType != null) self.recordType = recordType;
  if (category != null) self.category = category;
  if (templates != null) self.templates = templates;
  if (icon != null) self.icon = icon;
  if (tenses != null) self.tenses = tenses;
  if (factTokens != null) self.factTokens = factTokens;
  if (bundle != null) self.bundle = bundle;
  if (dates != null) self.dates = dates;
  if (links != null) self.links = links;
  if (duration != null) self.duration = duration;
  if (isSingleton != null) self.isSingleton = isSingleton;
  if (isAttribute != null) self.isAttribute = isAttribute;
  return self;
}