copyWith method

DialogThemeData copyWith({
  1. Color? background,
  2. Color? foreground,
  3. Color? overlayColor,
  4. double? overlayOpacity,
  5. Color? buttonBackground,
  6. Color? buttonSelectedBackground,
  7. Color? buttonForeground,
  8. Color? buttonSelectedForeground,
  9. Color? hintForeground,
  10. Color? footerBackground,
  11. int? width,
  12. int? maxHeight,
})

Copy with selective overrides.

Implementation

DialogThemeData copyWith({
  Color? background,
  Color? foreground,
  Color? overlayColor,
  double? overlayOpacity,
  Color? buttonBackground,
  Color? buttonSelectedBackground,
  Color? buttonForeground,
  Color? buttonSelectedForeground,
  Color? hintForeground,
  Color? footerBackground,
  int? width,
  int? maxHeight,
}) {
  return DialogThemeData(
    background: background ?? this.background,
    foreground: foreground ?? this.foreground,
    overlayColor: overlayColor ?? this.overlayColor,
    overlayOpacity: overlayOpacity ?? this.overlayOpacity,
    buttonBackground: buttonBackground ?? this.buttonBackground,
    buttonSelectedBackground:
        buttonSelectedBackground ?? this.buttonSelectedBackground,
    buttonForeground: buttonForeground ?? this.buttonForeground,
    buttonSelectedForeground:
        buttonSelectedForeground ?? this.buttonSelectedForeground,
    hintForeground: hintForeground ?? this.hintForeground,
    footerBackground: footerBackground ?? this.footerBackground,
    width: width ?? this.width,
    maxHeight: maxHeight ?? this.maxHeight,
  );
}