copyWith method

StoryReaderConfig copyWith({
  1. int? storyId,
  2. int? startChapter,
  3. int? defaultTextSize,
  4. int? endPageRecSize,
  5. bool? hideBack,
  6. int? pageTurnType,
  7. int? fontSizeLevel,
  8. String? customMiddlePageAdViewId,
  9. int? middlePageInterval,
  10. String? customMiddleLineAdViewId,
  11. int? middleLineStartLine,
  12. int? middleLineInterval,
  13. String? customBannerAdViewId,
})

复制配置(可修改部分参数)

Implementation

StoryReaderConfig copyWith({
  int? storyId,
  int? startChapter,
  int? defaultTextSize,
  int? endPageRecSize,
  bool? hideBack,
  int? pageTurnType,
  int? fontSizeLevel,
  String? customMiddlePageAdViewId,
  int? middlePageInterval,
  String? customMiddleLineAdViewId,
  int? middleLineStartLine,
  int? middleLineInterval,
  String? customBannerAdViewId,
}) {
  return StoryReaderConfig(
    storyId: storyId ?? this.storyId,
    startChapter: startChapter ?? this.startChapter,
    defaultTextSize: defaultTextSize ?? this.defaultTextSize,
    endPageRecSize: endPageRecSize ?? this.endPageRecSize,
    hideBack: hideBack ?? this.hideBack,
    pageTurnType: pageTurnType ?? this.pageTurnType,
    fontSizeLevel: fontSizeLevel ?? this.fontSizeLevel,
    customMiddlePageAdViewId:
        customMiddlePageAdViewId ?? this.customMiddlePageAdViewId,
    middlePageInterval: middlePageInterval ?? this.middlePageInterval,
    customMiddleLineAdViewId:
        customMiddleLineAdViewId ?? this.customMiddleLineAdViewId,
    middleLineStartLine: middleLineStartLine ?? this.middleLineStartLine,
    middleLineInterval: middleLineInterval ?? this.middleLineInterval,
    customBannerAdViewId: customBannerAdViewId ?? this.customBannerAdViewId,
  );
}