copyWith method

OkfDocument copyWith({
  1. Map<String, Object?>? frontmatter,
  2. String? body,
  3. bool? hasFrontmatter,
})

Returns a copy with selected document parts replaced.

Implementation

OkfDocument copyWith({
  Map<String, Object?>? frontmatter,
  String? body,
  bool? hasFrontmatter,
}) =>
    OkfDocument(
      frontmatter: frontmatter ?? this.frontmatter,
      body: body ?? this.body,
      hasFrontmatter: hasFrontmatter ?? this.hasFrontmatter,
    );