copyWith method
Builds a copy of a Info
id
: The shader iddate
: The publish date of the shaderviews
: The shader viewsname
: The shader nameuserId
: The id of the user that created the shaderdescription
: The shader descriptionlikes
: The number of likesprivacy
: The shader privacyflags
: The shader flagstags
: The shader tagshasLiked
: If the current logged user liked the shader
Implementation
Info copyWith({
String? id,
DateTime? date,
int? views,
String? name,
String? userId,
String? description,
int? likes,
ShaderPrivacy? privacy,
int? flags,
List<String>? tags,
bool? hasLiked,
}) {
return Info(
id: id ?? this.id,
date: date ?? this.date,
views: views ?? this.views,
name: name ?? this.name,
userId: userId ?? this.userId,
description: description ?? this.description,
likes: likes ?? this.likes,
privacy: privacy ?? this.privacy,
flags: flags ?? this.flags,
tags: tags ?? this.tags,
hasLiked: hasLiked ?? this.hasLiked,
);
}