copyWith method

PeamanFeed copyWith({
  1. String? id,
  2. String? ownerId,
  3. PeamanFeedType? type,
  4. String? caption,
  5. List<PeamanFileUrl>? files,
  6. int? reactionsCount,
  7. int? commentsCount,
  8. int? repliesCount,
  9. int? savesCount,
  10. int? sharesCount,
  11. int? viewsCount,
  12. bool? featured,
  13. List<String>? searchKeys,
  14. int? createdAt,
  15. int? updatedAt,
  16. bool? visibility,
  17. Map<String, dynamic>? extraData,
})

Implementation

PeamanFeed copyWith({
  String? id,
  final String? ownerId,
  final PeamanFeedType? type,
  final String? caption,
  final List<PeamanFileUrl>? files,
  final int? reactionsCount,
  final int? commentsCount,
  final int? repliesCount,
  final int? savesCount,
  final int? sharesCount,
  final int? viewsCount,
  final bool? featured,
  final List<String>? searchKeys,
  final int? createdAt,
  final int? updatedAt,
  final bool? visibility,
  final Map<String, dynamic>? extraData,
}) {
  return PeamanFeed(
    id: id ?? this.id,
    ownerId: ownerId ?? this.ownerId,
    type: type ?? this.type,
    caption: caption ?? this.caption,
    files: files ?? this.files,
    reactionsCount: reactionsCount ?? this.reactionsCount,
    commentsCount: commentsCount ?? this.commentsCount,
    repliesCount: commentsCount ?? this.repliesCount,
    savesCount: savesCount ?? this.savesCount,
    sharesCount: sharesCount ?? this.sharesCount,
    viewsCount: viewsCount ?? this.viewsCount,
    featured: featured ?? this.featured,
    searchKeys: searchKeys ?? this.searchKeys,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    visibility: visibility ?? this.visibility,
    extraData: extraData ?? this.extraData,
  );
}