copyWith method

StatisticalValue copyWith({
  1. double? value,
  2. double? previousValue,
  3. double? growthRatePercentage,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

StatisticalValue copyWith({
  double? value,
  double? previousValue,
  double? growthRatePercentage,
}) =>
    StatisticalValue(
      value: value ?? this.value,
      previousValue: previousValue ?? this.previousValue,
      growthRatePercentage: growthRatePercentage ?? this.growthRatePercentage,
    );