copyWith method
S2GroupConfig
copyWith({
- bool? enabled,
- bool? useSelector,
- bool? useCounter,
- S2GroupSort? sortBy,
- 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),
);
}