copyWith method

  1. @override
PostModel copyWith({
  1. String? documentID,
  2. String? authorId,
  3. DateTime? timestamp,
  4. String? appId,
  5. String? feedId,
  6. String? postAppId,
  7. String? postPageId,
  8. Map<String, dynamic>? pageParameters,
  9. String? html,
  10. String? description,
  11. int? likes,
  12. int? dislikes,
  13. PostAccessibleByGroup? accessibleByGroup,
  14. List<String>? accessibleByMembers,
  15. List<String>? readAccess,
  16. PostArchiveStatus? archived,
  17. String? externalLink,
  18. List<MemberMediumContainerModel>? memberMedia,
})
override

Implementation

@override
PostModel copyWith({
  String? documentID,
  String? authorId,
  DateTime? timestamp,
  String? appId,
  String? feedId,
  String? postAppId,
  String? postPageId,
  Map<String, dynamic>? pageParameters,
  String? html,
  String? description,
  int? likes,
  int? dislikes,
  PostAccessibleByGroup? accessibleByGroup,
  List<String>? accessibleByMembers,
  List<String>? readAccess,
  PostArchiveStatus? archived,
  String? externalLink,
  List<MemberMediumContainerModel>? memberMedia,
}) {
  return PostModel(
    documentID: documentID ?? this.documentID,
    authorId: authorId ?? this.authorId,
    timestamp: timestamp ?? this.timestamp,
    appId: appId ?? this.appId,
    feedId: feedId ?? this.feedId,
    postAppId: postAppId ?? this.postAppId,
    postPageId: postPageId ?? this.postPageId,
    pageParameters: pageParameters ?? this.pageParameters,
    html: html ?? this.html,
    description: description ?? this.description,
    likes: likes ?? this.likes,
    dislikes: dislikes ?? this.dislikes,
    accessibleByGroup: accessibleByGroup ?? this.accessibleByGroup,
    accessibleByMembers: accessibleByMembers ?? this.accessibleByMembers,
    readAccess: readAccess ?? this.readAccess,
    archived: archived ?? this.archived,
    externalLink: externalLink ?? this.externalLink,
    memberMedia: memberMedia ?? this.memberMedia,
  );
}