copyWith method

PublicBriefRouteTransportInfo copyWith({
  1. PublicTransportType? type,
  2. List<String>? names,
  3. Optional<int?>? color,
})

Implementation

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