copyWith method
Implementation
RolloutStrategy copyWith({
String? id,
String? name,
int? percentage,
List<String>? percentageAttributes,
int? colouring,
String? avatar,
dynamic value,
List<RolloutStrategyAttribute>? attributes,
}) {
id ??= this.id;
name ??= this.name;
percentage ??= this.percentage;
percentageAttributes ??= this.percentageAttributes;
colouring ??= this.colouring;
avatar ??= this.avatar;
value ??= this.value;
attributes ??= this.attributes;
final _copy_id = id;
final _copy_name = name;
final _copy_percentage = percentage;
final _copy_percentageAttributes = ((List<String> data) {
return data.toList();
}(percentageAttributes));
final _copy_colouring = colouring;
final _copy_avatar = avatar;
final _copy_value = value;
final _copy_attributes = ((List<RolloutStrategyAttribute> data) {
return data.map((data) => data.copyWith()).toList();
}(attributes));
return RolloutStrategy(
id: _copy_id,
name: _copy_name,
percentage: _copy_percentage,
percentageAttributes: _copy_percentageAttributes,
colouring: _copy_colouring,
avatar: _copy_avatar,
value: _copy_value,
attributes: _copy_attributes,
);
}