copyWith method
Implementation
PublicTransportInfo copyWith({
PublicTransportType? type,
List<String>? names,
List<int>? suggestedCarNumbers,
String? boardingSuggest,
Optional<int?>? color,
String? routeLogo
}) {
return PublicTransportInfo(
type: type ?? this.type,
names: names ?? this.names,
suggestedCarNumbers: suggestedCarNumbers ?? this.suggestedCarNumbers,
boardingSuggest: boardingSuggest ?? this.boardingSuggest,
color: color != null ? color.value : this.color,
routeLogo: routeLogo ?? this.routeLogo
);
}