copyWith method Null safety
- {Color? backgroundColor,
- TextStyle? contentTextStyle,
- double? elevation,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? leadingPadding}
Creates a copy of this object with the given fields replaced with the new values.
Implementation
MaterialBannerThemeData copyWith({
Color? backgroundColor,
TextStyle? contentTextStyle,
double? elevation,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? leadingPadding,
}) {
return MaterialBannerThemeData(
backgroundColor: backgroundColor ?? this.backgroundColor,
contentTextStyle: contentTextStyle ?? this.contentTextStyle,
elevation: elevation ?? this.elevation,
padding: padding ?? this.padding,
leadingPadding: leadingPadding ?? this.leadingPadding,
);
}