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
@override
PushMessageContentPhoto copyWith({
Photo? Function()? photo,
String? caption,
bool? isSecret,
bool? isPinned,
}) =>
PushMessageContentPhoto(
photo: photo != null ? photo() : this.photo,
caption: caption ?? this.caption,
isSecret: isSecret ?? this.isSecret,
isPinned: isPinned ?? this.isPinned,
);