copyWith method
FeatureState
copyWith({
- String? id,
- String? key,
- bool? l,
- int? version,
- FeatureValueType? type,
- dynamic value,
- String? environmentId,
- List<
RolloutStrategy> ? strategies,
Implementation
FeatureState copyWith({
String? id,
String? key,
bool? l,
int? version,
FeatureValueType? type,
dynamic value,
String? environmentId,
List<RolloutStrategy>? strategies,
}) {
id ??= this.id;
key ??= this.key;
l ??= this.l;
version ??= this.version;
type ??= this.type;
value ??= this.value;
environmentId ??= this.environmentId;
strategies ??= this.strategies;
final _copy_id = id;
final _copy_key = key;
final _copy_l = l;
final _copy_version = version;
final _copy_type = type;
final _copy_value = value;
final _copy_environmentId = environmentId;
final _copy_strategies = ((List<RolloutStrategy> data) {
return data.map((data) => data.copyWith()).toList();
}(strategies));
return FeatureState(
id: _copy_id,
key: _copy_key,
l: _copy_l,
version: _copy_version,
type: _copy_type,
value: _copy_value,
environmentId: _copy_environmentId,
strategies: _copy_strategies,
);
}