copyWith method

S2GroupConfig copyWith({
  1. bool? enabled,
  2. bool? useSelector,
  3. bool? useCounter,
  4. S2GroupSort? sortBy,
  5. S2GroupHeaderStyle? headerStyle,
})

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

Implementation

S2GroupConfig copyWith({
  bool? enabled,
  bool? useSelector,
  bool? useCounter,
  S2GroupSort? sortBy,
  S2GroupHeaderStyle? headerStyle,
}) {
  return S2GroupConfig(
    enabled: enabled ?? this.enabled,
    useSelector: useSelector ?? this.useSelector,
    useCounter: useCounter ?? this.useCounter,
    sortBy: sortBy ?? this.sortBy,
    headerStyle: headerStyle == null
        ? this.headerStyle
        : this.headerStyle.merge(headerStyle),
  );
}