copyWith method
S2ModalHeaderStyle
copyWith({
- ShapeBorder? shape,
- double? elevation,
- Color? backgroundColor,
- Brightness? brightness,
- bool? useLeading,
- bool? centerTitle,
- TextStyle? textStyle,
- TextStyle? errorStyle,
- IconThemeData? iconTheme,
- IconThemeData? actionsIconTheme,
Creates a copy of this S2ModalHeaderStyle but with the given fields replaced with the new values.
Implementation
S2ModalHeaderStyle copyWith({
ShapeBorder? shape,
double? elevation,
Color? backgroundColor,
Brightness? brightness,
bool? useLeading,
bool? centerTitle,
TextStyle? textStyle,
TextStyle? errorStyle,
IconThemeData? iconTheme,
IconThemeData? actionsIconTheme,
}) {
return S2ModalHeaderStyle(
shape: shape ?? this.shape,
elevation: elevation ?? this.elevation,
backgroundColor: backgroundColor ?? this.backgroundColor,
brightness: brightness ?? this.brightness,
useLeading: useLeading ?? this.useLeading,
centerTitle: centerTitle ?? this.centerTitle,
textStyle: this.textStyle?.merge(textStyle) ?? textStyle,
errorStyle: this.errorStyle?.merge(errorStyle) ?? errorStyle,
iconTheme: this.iconTheme?.merge(iconTheme) ?? iconTheme,
actionsIconTheme:
this.actionsIconTheme?.merge(actionsIconTheme) ?? actionsIconTheme,
);
}