add method

Story add(
  1. String name,
  2. ChapterBuildFunction buildFn, {
  3. String? codeLink,
  4. String? info,
  5. bool pinInfo = false,
})

Implementation

Story add(
  String name,
  ChapterBuildFunction buildFn, {
  String? codeLink,
  String? info,
  bool pinInfo = false,
}) {
  final _chapter = Chapter(
    name,
    buildFn,
    this,
    codeLink: codeLink,
    info: info,
    pinInfo: pinInfo,
  );
  chapters.add(_chapter);

  return this;
}