copyWith method

ReaderTheme copyWith({
  1. Color? backgroundColor,
  2. String? backgroundImage,
  3. EdgeInsets? footerPadding,
  4. TextStyle? footerStyle,
  5. EdgeInsets? headerPadding,
  6. TextStyle? headerStyle,
  7. EdgeInsets? pagePadding,
  8. TextStyle? pageStyle,
  9. TextDirection? textDirection,
})

Implementation

ReaderTheme copyWith({
  Color? backgroundColor,
  String? backgroundImage,
  EdgeInsets? footerPadding,
  TextStyle? footerStyle,
  EdgeInsets? headerPadding,
  TextStyle? headerStyle,
  EdgeInsets? pagePadding,
  TextStyle? pageStyle,
  TextDirection? textDirection,
}) {
  return ReaderTheme()
    ..backgroundColor = backgroundColor ?? this.backgroundColor
    ..backgroundImage = backgroundImage ?? this.backgroundImage
    ..footerPadding = footerPadding ?? this.footerPadding
    ..footerStyle = footerStyle ?? this.footerStyle
    ..headerPadding = headerPadding ?? this.headerPadding
    ..headerStyle = headerStyle ?? this.headerStyle
    ..pagePadding = pagePadding ?? this.pagePadding
    ..pageStyle = pageStyle ?? this.pageStyle
    ..textDirection = textDirection ?? this.textDirection;
}