copyWith method

MaterialBannerThemeData copyWith(
  1. {Color? backgroundColor,
  2. Color? surfaceTintColor,
  3. Color? shadowColor,
  4. Color? dividerColor,
  5. TextStyle? contentTextStyle,
  6. double? elevation,
  7. EdgeInsetsGeometry? padding,
  8. EdgeInsetsGeometry? leadingPadding}
)

Creates a copy of this object with the given fields replaced with the new values.

Implementation

MaterialBannerThemeData copyWith({
  Color? backgroundColor,
  Color? surfaceTintColor,
  Color? shadowColor,
  Color? dividerColor,
  TextStyle? contentTextStyle,
  double? elevation,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? leadingPadding,
}) {
  return MaterialBannerThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    shadowColor: shadowColor ?? this.shadowColor,
    dividerColor: dividerColor ?? this.dividerColor,
    contentTextStyle: contentTextStyle ?? this.contentTextStyle,
    elevation: elevation ?? this.elevation,
    padding: padding ?? this.padding,
    leadingPadding: leadingPadding ?? this.leadingPadding,
  );
}