copyWith method
PageDecoration
copyWith({
- Color? pageColor,
- TextStyle? titleTextStyle,
- TextStyle? bodyTextStyle,
- BoxDecoration? boxDecoration,
- int? imageFlex,
- int? bodyFlex,
- EdgeInsets? imagePadding,
- EdgeInsets? contentMargin,
- EdgeInsets? pageMargin,
- EdgeInsets? titlePadding,
- EdgeInsets? descriptionPadding,
- Alignment? bodyAlignment,
- Alignment? imageAlignment,
- bool? fullScreen,
- 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,
);
}