copyWith method

PublicTransportDirectoryRouteInfo copyWith({
  1. DgisObjectId? id,
  2. String? name,
  3. PublicTransportRouteType? routeType,
  4. Optional<int?>? color,
  5. Optional<PublicTransportDirectoryRouteDirectionNamesInfo?>? fromToStationNames,
  6. List<PublicTransportRouteDirection>? directions,
})

Implementation

PublicTransportDirectoryRouteInfo copyWith({
  DgisObjectId? id,
  String? name,
  PublicTransportRouteType? routeType,
  Optional<int?>? color,
  Optional<PublicTransportDirectoryRouteDirectionNamesInfo?>? fromToStationNames,
  List<PublicTransportRouteDirection>? directions
}) {
  return PublicTransportDirectoryRouteInfo(
    id: id ?? this.id,
    name: name ?? this.name,
    routeType: routeType ?? this.routeType,
    color: color != null ? color.value : this.color,
    fromToStationNames: fromToStationNames != null ? fromToStationNames.value : this.fromToStationNames,
    directions: directions ?? this.directions
  );
}