copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
CommunityChat copyWith({int? chatId, bool? canViewHistory, bool? isHidden}) =>
CommunityChat(
chatId: chatId ?? this.chatId,
canViewHistory: canViewHistory ?? this.canViewHistory,
isHidden: isHidden ?? this.isHidden,
);