copyWith method

S2GroupHeaderStyle copyWith({
  1. Color? backgroundColor,
  2. Color? highlightColor,
  3. TextStyle? textStyle,
  4. EdgeInsetsGeometry? padding,
  5. double? height,
  6. CrossAxisAlignment? crossAxisAlignment,
  7. MainAxisAlignment? mainAxisAlignment,
})

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

Implementation

S2GroupHeaderStyle copyWith({
  Color? backgroundColor,
  Color? highlightColor,
  TextStyle? textStyle,
  EdgeInsetsGeometry? padding,
  double? height,
  CrossAxisAlignment? crossAxisAlignment,
  MainAxisAlignment? mainAxisAlignment,
}) {
  return S2GroupHeaderStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    highlightColor: highlightColor ?? this.highlightColor,
    textStyle: this.textStyle?.merge(textStyle) ?? textStyle,
    padding: padding ?? this.padding,
    height: height ?? this.height,
    crossAxisAlignment: crossAxisAlignment ?? this.crossAxisAlignment,
    mainAxisAlignment: mainAxisAlignment ?? this.mainAxisAlignment,
  );
}