copyWith method

ThermalState copyWith({
  1. String? state,
  2. int? level,
  3. String? description,
  4. bool? isThrottling,
  5. String? statusMessage,
  6. ThermalLevel? thermalLevel,
})

Implementation

ThermalState copyWith({
  String? state,
  int? level,
  String? description,
  bool? isThrottling,
  String? statusMessage,
  ThermalLevel? thermalLevel,
}) {
  return ThermalState(
    state: state ?? this.state,
    level: level ?? this.level,
    description: description ?? this.description,
    isThrottling: isThrottling ?? this.isThrottling,
    statusMessage: statusMessage ?? this.statusMessage,
    thermalLevel: thermalLevel ?? this.thermalLevel,
  );
}