copyWith method

CommunityChat copyWith({
  1. int? chatId,
  2. bool? canViewHistory,
  3. bool? isHidden,
})

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,
    );