copyWith method

PageDecoration copyWith({
  1. Color? pageColor,
  2. TextStyle? titleTextStyle,
  3. TextStyle? bodyTextStyle,
  4. BoxDecoration? boxDecoration,
  5. int? imageFlex,
  6. int? bodyFlex,
  7. int? footerFlex,
  8. FlexFit? footerFit,
  9. EdgeInsets? imagePadding,
  10. EdgeInsets? contentMargin,
  11. EdgeInsets? pageMargin,
  12. EdgeInsets? titlePadding,
  13. EdgeInsets? descriptionPadding,
  14. EdgeInsets? footerPadding,
  15. Alignment? bodyAlignment,
  16. Alignment? imageAlignment,
  17. bool? fullScreen,
  18. double? safeArea,
})

Implementation

PageDecoration copyWith({
  Color? pageColor,
  TextStyle? titleTextStyle,
  TextStyle? bodyTextStyle,
  BoxDecoration? boxDecoration,
  int? imageFlex,
  int? bodyFlex,
  int? footerFlex,
  FlexFit? footerFit,
  EdgeInsets? imagePadding,
  EdgeInsets? contentMargin,
  EdgeInsets? pageMargin,
  EdgeInsets? titlePadding,
  EdgeInsets? descriptionPadding,
  EdgeInsets? footerPadding,
  Alignment? bodyAlignment,
  Alignment? imageAlignment,
  bool? fullScreen,
  double? safeArea,
}) {
  assert(
    pageColor == null || boxDecoration == null,
    'Cannot provide both a Color and a BoxDecoration\n',
  );

  return PageDecoration(
    pageColor: pageColor ?? this.pageColor,
    titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    bodyTextStyle: bodyTextStyle ?? this.bodyTextStyle,
    boxDecoration: boxDecoration ?? this.boxDecoration,
    imageFlex: imageFlex ?? this.imageFlex,
    bodyFlex: bodyFlex ?? this.bodyFlex,
    footerFlex: footerFlex ?? this.footerFlex,
    footerFit: footerFit ?? this.footerFit,
    imagePadding: imagePadding ?? this.imagePadding,
    contentMargin: contentMargin ?? this.contentMargin,
    pageMargin: pageMargin ?? this.pageMargin,
    titlePadding: titlePadding ?? this.titlePadding,
    bodyPadding: descriptionPadding ?? this.bodyPadding,
    footerPadding: footerPadding ?? this.footerPadding,
    bodyAlignment: bodyAlignment ?? this.bodyAlignment,
    imageAlignment: imageAlignment ?? this.imageAlignment,
    fullScreen: fullScreen ?? this.fullScreen,
    safeArea: safeArea ?? this.safeArea,
  );
}