copyWith method

S2Group copyWith({
  1. String? name,
  2. List<S2Choice>? choices,
  3. S2GroupHeaderStyle? headerStyle,
})

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

Implementation

S2Group copyWith({
  String? name,
  List<S2Choice>? choices,
  S2GroupHeaderStyle? headerStyle,
}) {
  return S2Group(
    name: name ?? this.name,
    choices: choices ?? this.choices,
    headerStyle: headerStyle ?? this.headerStyle,
  );
}