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
SharedChat copyWith({
int? chatId,
String? title,
String? username,
Photo? Function()? photo,
}) => SharedChat(
chatId: chatId ?? this.chatId,
title: title ?? this.title,
username: username ?? this.username,
photo: photo != null ? photo() : this.photo,
);