copyWith method

S2ModalHeaderStyle copyWith({
  1. ShapeBorder? shape,
  2. double? elevation,
  3. Color? backgroundColor,
  4. Brightness? brightness,
  5. bool? useLeading,
  6. bool? centerTitle,
  7. TextStyle? textStyle,
  8. TextStyle? errorStyle,
  9. IconThemeData? iconTheme,
  10. 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,
  );
}