MetadataOverrides.coerced constructor

MetadataOverrides.coerced({
  1. String? label,
  2. String? editLabel,
  3. String? pluralLabel,
  4. bool? isDisabled,
  5. String? addLabel,
  6. String? category,
  7. Map<JsonPath, List<MetaFieldConfig>>? formConfig,
  8. Map<JsonPath, MetaDateFormatter>? metaDateFormatters,
  9. Set<JsonPath>? ignoredPaths = const {},
  10. Map<dynamic, String>? labels,
  11. Map<dynamic, String>? placeholders,
  12. Iterable? sortOrder,
})

Implementation

MetadataOverrides.coerced(
    {this.label,
    this.editLabel,
    this.pluralLabel,
    this.isDisabled,
    this.addLabel,
    this.category,
    this.formConfig,
    this.metaDateFormatters,
    this.ignoredPaths = const {},
    Map<dynamic, String>? labels,
    Map<dynamic, String>? placeholders,
    Iterable<dynamic>? sortOrder})
    : labels = labels?.map((k, v) => MapEntry(JsonPath.of(k), v)) ?? {},
      sortOrder = sortOrder?.map((p) => JsonPath.of(p)).toList() ?? const [],
      placeholders =
          placeholders?.map((k, v) => MapEntry(JsonPath.of(k), v)) ?? {};