copyWith method

TrafficControlState copyWith({
  1. TrafficControlStatus? status,
  2. Optional<int?>? score,
})

Implementation

TrafficControlState copyWith({
  TrafficControlStatus? status,
  Optional<int?>? score
}) {
  return TrafficControlState(
    status: status ?? this.status,
    score: score != null ? score.value : this.score
  );
}