copyWith method

RolloutStrategyAttribute copyWith({
  1. String? id,
  2. RolloutStrategyAttributeConditional? conditional,
  3. String? fieldName,
  4. List? values,
  5. RolloutStrategyFieldType? type,
})

Implementation

RolloutStrategyAttribute copyWith({
  String? id,
  RolloutStrategyAttributeConditional? conditional,
  String? fieldName,
  List<dynamic>? values,
  RolloutStrategyFieldType? type,
}) {
  id ??= this.id;
  conditional ??= this.conditional;
  fieldName ??= this.fieldName;
  values ??= this.values;
  type ??= this.type;

  final _copy_id = id;
  final _copy_conditional = conditional;
  final _copy_fieldName = fieldName;
  final _copy_values = ((List<dynamic> data) {
    return data.toList();
  }(values));

  final _copy_type = type;

  return RolloutStrategyAttribute(
    id: _copy_id,
    conditional: _copy_conditional,
    fieldName: _copy_fieldName,
    values: _copy_values,
    type: _copy_type,
  );
}