copyWith method

Report copyWith({
  1. String? type,
  2. GeoPoint? location,
  3. String? geohash,
  4. Timestamp? expiresAt,
  5. int? direction,
  6. int? lane,
  7. String? suggestedAlternative,
  8. Map<String, dynamic>? details,
})

Creates a copy of this Report with optional parameter updates

Implementation

Report copyWith({
  String? type,
  GeoPoint? location,
  String? geohash,
  Timestamp? expiresAt,
  int? direction,
  int? lane,
  String? suggestedAlternative,
  Map<String, dynamic>? details,
}) {
  return Report(
    id: id,
    type: type ?? this.type,
    location: location ?? this.location,
    geohash: geohash ?? this.geohash,
    createdBy: createdBy,
    createdAt: createdAt,
    expiresAt: expiresAt ?? this.expiresAt,
    direction: direction ?? this.direction,
    lane: lane ?? this.lane,
    suggestedAlternative: suggestedAlternative ?? this.suggestedAlternative,
    details: details ?? this.details,
  );
}