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
ToggleChatIsPinned copyWith({
ChatList? chatList,
int? chatId,
bool? isPinned,
}) =>
ToggleChatIsPinned(
chatList: chatList ?? this.chatList,
chatId: chatId ?? this.chatId,
isPinned: isPinned ?? this.isPinned,
);