copyWith method

KeyMetadata copyWith({
  1. int? headerLevel,
  2. DividerMeta? divider,
  3. CalloutMeta? callout,
  4. CodeBlockMeta? codeBlock,
  5. ListMeta? listMeta,
  6. TableMeta? tableMeta,
  7. EmphasisMeta? emphasis,
  8. XmlMeta? xmlMeta,
  9. YamlMeta? yamlMeta,
  10. JsonMeta? jsonMeta,
  11. WhitespaceMeta? whitespace,
  12. Map<String, KeyMetadata>? children,
})

Creates a copy with updated values.

Implementation

KeyMetadata copyWith({
  int? headerLevel,
  DividerMeta? divider,
  CalloutMeta? callout,
  CodeBlockMeta? codeBlock,
  ListMeta? listMeta,
  TableMeta? tableMeta,
  EmphasisMeta? emphasis,
  XmlMeta? xmlMeta,
  YamlMeta? yamlMeta,
  JsonMeta? jsonMeta,
  WhitespaceMeta? whitespace,
  Map<String, KeyMetadata>? children,
}) {
  return KeyMetadata(
    headerLevel: headerLevel ?? this.headerLevel,
    divider: divider ?? this.divider,
    callout: callout ?? this.callout,
    codeBlock: codeBlock ?? this.codeBlock,
    listMeta: listMeta ?? this.listMeta,
    tableMeta: tableMeta ?? this.tableMeta,
    emphasis: emphasis ?? this.emphasis,
    xmlMeta: xmlMeta ?? this.xmlMeta,
    yamlMeta: yamlMeta ?? this.yamlMeta,
    jsonMeta: jsonMeta ?? this.jsonMeta,
    whitespace: whitespace ?? this.whitespace,
    children: children ?? this.children,
  );
}