operator + method

Chapter operator +(
  1. Chapter other
)

Implementation

Chapter operator +(Chapter other) {
  List<Content> mergedContents = contents;
  mergedContents.addAll(other.contents);
  return Chapter(heading: heading, contents: mergedContents);
}