copyWith method

Photo copyWith({
  1. String? name,
  2. int? widthPx,
  3. int? heightPx,
  4. List<AuthorAttribution>? authorAttributions,
  5. String? flagContentUri,
  6. String? googleMapsUri,
  7. String? photoUri,
})

Implementation

Photo copyWith({
  String? name,
  int? widthPx,
  int? heightPx,
  List<AuthorAttribution>? authorAttributions,
  String? flagContentUri,
  String? googleMapsUri,
  String? photoUri,
}) {
  return Photo(
    name: name ?? this.name,
    widthPx: widthPx ?? this.widthPx,
    heightPx: heightPx ?? this.heightPx,
    authorAttributions:
        ((authorAttributions?.isNotEmpty ?? false)
            ? authorAttributions
            : null) ??
        this.authorAttributions,
    flagContentUri: flagContentUri ?? this.flagContentUri,
    googleMapsUri: googleMapsUri ?? this.googleMapsUri,
    photoUri: photoUri ?? this.photoUri,
  );
}