copyWith method

  1. @override
ChatModel copyWith({
  1. String? documentID,
  2. String? authorId,
  3. String? appId,
  4. String? roomId,
  5. DateTime? timestamp,
  6. String? saying,
  7. ChatAccessibleByGroup? accessibleByGroup,
  8. List<String>? accessibleByMembers,
  9. List<String>? readAccess,
  10. List<ChatMediumModel>? chatMedia,
})
override

Implementation

@override
ChatModel copyWith({
  String? documentID,
  String? authorId,
  String? appId,
  String? roomId,
  DateTime? timestamp,
  String? saying,
  ChatAccessibleByGroup? accessibleByGroup,
  List<String>? accessibleByMembers,
  List<String>? readAccess,
  List<ChatMediumModel>? chatMedia,
}) {
  return ChatModel(
    documentID: documentID ?? this.documentID,
    authorId: authorId ?? this.authorId,
    appId: appId ?? this.appId,
    roomId: roomId ?? this.roomId,
    timestamp: timestamp ?? this.timestamp,
    saying: saying ?? this.saying,
    accessibleByGroup: accessibleByGroup ?? this.accessibleByGroup,
    accessibleByMembers: accessibleByMembers ?? this.accessibleByMembers,
    readAccess: readAccess ?? this.readAccess,
    chatMedia: chatMedia ?? this.chatMedia,
  );
}